/* SpeakSharp - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --primary-color: #4F46E5; */
    /* --primary-color: #4338CA; */
    --primary-color: #EFBF04;
    --primary-color-darker: #d8b218;
    --primary-color-light-1: #efc0042f;
    --primary-color-light-2: #efc00418;
    --success-color: #10B981;
    --danger-color: #EF4444;
    --secondary-color: #6B7280;
    --bg-color: #F9FAFB;
    --card-bg: #FFFFFF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Session Selector */
.session-selector {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.session-selector h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Mode Selector (Record vs Upload) */
.mode-selector {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.mode-tabs {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.mode-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--card-bg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.mode-tab:hover:not(:disabled) {
    border-color: var(--primary-color);
    /* background: #F9FAFB; */
    background-color: var(--primary-color-light-2);
}

.mode-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    /* color: white; */
    color: var(--text-primary);
}

.mode-tab.active:hover {
    border-color: var(--primary-color);
    background: var(--primary-color-darker);
    color: var(--text-primary);
}

.mode-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.session-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.session-type-option input[type="radio"] {
    display: none;
}

.option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--card-bg);
}

.align-self-center {
    align-self: center;
}

.option-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.session-type-option input[type="radio"]:checked+.option-card {
    border-color: var(--primary-color);
    background: #EEF2FF;
}

.session-type-option input[type="radio"]:disabled+.option-card {
    opacity: 0.5;
    cursor: not-allowed;
}

.option-card .icon {
    font-size: 2.5rem;
}

.option-card .label {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Video Section */
.video-section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
}

.video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Audio-Only Mode */
.audio-only-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.audio-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.small-text {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

/* Recording Indicator */
.recording-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
}

.pulse {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
    color: var(--text-primary) !important;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-color-darker)
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #4B5563;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Feedback Section */
.feedback-section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.feedback-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.feedback-card {
    max-width: 800px;
    margin: 0 auto;
}

.feedback-summary {
    background: #EEF2FF;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.feedback-summary h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.feedback-summary p {
    font-size: 1.125rem;
    line-height: 1.7;
}

.feedback-tips {
    background: #F0FDF4;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.feedback-tips h3 {
    font-size: 1.25rem;
    color: var(--success-color);
    margin-bottom: 0.75rem;
}

.feedback-tips ol {
    padding-left: 1.5rem;
}

.feedback-tips li {
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.feedback-tips li strong,
.feedback-summary p strong {
    color: var(--primary-color-darker);
    font-weight: 700;
}

.feedback-tips li em,
.feedback-summary p em {
    font-style: italic;
    color: var(--text-primary);
}

/* Error Section */
.error-section {
    margin-bottom: 2rem;
}

.error-card {
    background: #FEF2F2;
    border: 2px solid #FCA5A5;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.error-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.error-card p {
    flex: 1;
    color: #991B1B;
    font-weight: 500;
}

/* Info Section */
.info-section {
    margin-bottom: 2rem;
}

.info-card {
    background: #EFF6FF;
    border: 2px solid #93C5FD;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.info-card h3 {
    color: #1E40AF;
    margin-bottom: 1rem;
}

.info-card code {
    background: #DBEAFE;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    color: #1E40AF;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .session-types {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}


/* Upload Section */
.upload-section {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.upload-container {
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-color);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: #F9FAFB;
}

.upload-area.has-file {
    border-color: var(--success-color);
    background: #F0FDF4;
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.file-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.file-icon {
    font-size: 3rem;
}

.file-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
    max-width: 100%;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
    }

    .upload-area {
        padding: 2rem 1rem;
        min-height: 250px;
    }
}