:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #4cc9f0;
    --success: #4ade80;
    --warning: #f59e0b;
    --error: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --border-radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.app-container {
    display: block;   
}

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.card-title i {
    margin-left: 10px;
    font-size: 1.6rem;
}

.upload-area {
    border: 2px dashed var(--gray-light);
    border-radius: var(--border-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 20px;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-area h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.upload-area p {
    color: var(--gray);
    margin-bottom: 15px;
}

#fileInput {
    display: none;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-left: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #2a9dc7;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.recording-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.recording-status {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: #f0f4ff;
    display: none;
}

.recording-status.recording {
    display: block;
    background-color: #fff0f0;
    color: var(--error);
}

.recording-status .pulse {
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: var(--error);
    border-radius: 50%;
    margin-left: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.transcript-container {
    min-height: 300px;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    background-color: #f9f9f9;
}

.transcript-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark);
}

.transcript-placeholder {
    color: var(--gray);
    text-align: center;
    padding: 60px 0;
}

.transcript-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.file-info {
    background-color: #f0f9ff;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 20px;
    display: none;
}

.file-info.show {
    display: block;
}

.file-info-header {
    display: none;
    
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.file-name {
    font-weight: 600;
    color: var(--dark);
}

.file-size {
    color: var(--gray);
    font-size: 0.9rem;
}

.progress {
    height: 8px;
    background-color: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

.history-item {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background-color: #f8fafc;
}

.history-item:last-child {
    border-bottom: none;
}

.history-date {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.history-preview {
    font-size: 1rem;
    color: var(--dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: white;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .recording-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .action-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
}
