/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #667eea;
    --primary-hover: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #16a34a;
    --warning-color: #ea580c;
    --info-color: #0891b2;
    
    /* Light theme colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #e2e8f0;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --surface: #1e293b;
    --surface-elevated: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #334155;
    --border-hover: #475569;
    
    /* Adjust shadows for dark mode */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    overflow-x: hidden;
}

/* 3D Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.08;
    filter: blur(40px);
    animation: float-rotate 20s ease-in-out infinite;
}

[data-theme="dark"] .shape {
    opacity: 0.12;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    width: 350px;
    height: 350px;
    top: 60%;
    right: 10%;
    animation-delay: -5s;
    animation-duration: 30s;
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.shape-3 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: 15%;
    animation-delay: -10s;
    animation-duration: 20s;
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.shape-4 {
    width: 450px;
    height: 450px;
    top: 40%;
    right: 5%;
    animation-delay: -15s;
    animation-duration: 35s;
}

.shape-5 {
    width: 250px;
    height: 250px;
    top: 20%;
    right: 30%;
    animation-delay: -8s;
    animation-duration: 22s;
    background: linear-gradient(135deg, #a8edea, #fed6e3);
}

.shape-6 {
    width: 350px;
    height: 350px;
    bottom: 20%;
    left: 40%;
    animation-delay: -12s;
    animation-duration: 28s;
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
}

@keyframes float-rotate {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg) scale(1.1);
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }
    50% {
        transform: translate(-20px, 20px) rotate(180deg) scale(0.9);
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }
    75% {
        transform: translate(30px, 10px) rotate(270deg) scale(1.05);
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }
}

/* Premium Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

.toggle-track {
    width: 64px;
    height: 32px;
    background: var(--surface-elevated);
    border-radius: 50px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-color);
}

.theme-toggle:hover .toggle-track {
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2),
                0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.toggle-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover .toggle-thumb {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .toggle-thumb {
    transform: translateX(32px);
}

.toggle-thumb svg {
    width: 18px;
    height: 18px;
    color: white;
    position: absolute;
    transition: all 0.3s ease;
}

.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #f093fb 100%);
    color: white;
    border-radius: 16px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header-icon {
    margin: 0 auto 20px;
    width: 64px;
    height: 64px;
    position: relative;
    z-index: 1;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    max-width: 750px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.8;
    font-weight: 300;
}

/* API Key Section */
.api-key-section {
    margin-top: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.api-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.api-input-wrapper {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

#api-key-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#api-key-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 1);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.toggle-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.api-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.api-hint a {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    text-decoration: underline;
}

.api-hint a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Input Section */
.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.input-group:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.input-group label {
    margin-bottom: 12px;
}

.input-group h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.label-hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* File Upload Section */
.file-upload-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.file-input {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-md);
}

.file-upload-btn svg {
    transition: transform 0.3s ease;
}

.file-upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.file-upload-btn:hover svg {
    transform: translateY(-2px);
}

.file-upload-btn:active {
    transform: translateY(-1px);
}

.filename-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.filename-display:not(:empty) {
    color: var(--success-color);
    font-weight: 500;
}

.format-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
}

textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
    resize: vertical;
    transition: all 0.3s ease;
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

textarea:hover {
    border-color: var(--border-hover);
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), var(--shadow-md);
    transform: translateY(-1px);
}

textarea::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

.char-count {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: right;
}

/* Action Section */
.action-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

button {
    padding: 16px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

button svg {
    transition: transform 0.3s ease;
}

button:hover svg {
    transform: scale(1.1);
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

.analyze-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 1.1rem;
    padding: 18px 48px;
}

.analyze-btn:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px);
}

.analyze-btn:active {
    transform: translateY(-1px);
}

.analyze-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.clear-btn {
    background: var(--surface);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.clear-btn:hover {
    background: var(--surface-elevated);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Results Section */
.results-section {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 2rem;
    color: var(--text-primary);
}

/* Score Card */
.score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AI Analysis Section */
.ai-analysis-section {
    margin-bottom: 50px;
    padding: 40px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.ai-section-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.ai-card {
    background: var(--surface-elevated);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.ai-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.ai-card h4 {
    font-size: 1.2rem;
    margin-bottom: 18px;
    color: var(--text-primary);
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 10px;
    font-weight: 700;
}

.ai-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.ai-content.loading {
    text-align: center;
    color: var(--primary-color);
    font-style: italic;
    padding: 30px;
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-content.loading::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.ai-content.error {
    color: #dc2626;
    background: #fee2e2;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #dc2626;
}

.ai-content ul {
    margin: 12px 0;
    padding-left: 20px;
}

.ai-content li {
    margin-bottom: 8px;
}

.ai-content strong {
    color: var(--text-primary);
}

.score-display {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.score-value {
    font-size: 5rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.score-label {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score-explanation {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 650px;
    margin: 20px auto 0;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.result-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-left: 5px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
}

.result-card:hover::before {
    opacity: 1;
}

.matched-card {
    border-left-color: var(--success-color);
}

.matched-card::before {
    background: linear-gradient(90deg, var(--success-color), #22c55e);
}

.missing-card {
    border-left-color: var(--warning-color);
}

.missing-card::before {
    background: linear-gradient(90deg, var(--warning-color), #fb923c);
}

.resume-only-card {
    border-left-color: var(--info-color);
}

.resume-only-card::before {
    background: linear-gradient(90deg, var(--info-color), #06b6d4);
}

.result-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.keyword-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 40px;
}

.keyword-tag {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--background);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.keyword-tag:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.keyword-tag.matched {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
    color: #166534;
}

.keyword-tag.matched:hover {
    box-shadow: 0 4px 12px rgba(22, 101, 52, 0.3);
}

.keyword-tag.missing {
    background: linear-gradient(135deg, #fed7aa 0%, #fca5a5 100%);
    border-color: #fdba74;
    color: #9a3412;
}

.keyword-tag.missing:hover {
    box-shadow: 0 4px 12px rgba(154, 52, 18, 0.3);
}

.keyword-tag.resume-only {
    background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%);
    border-color: #5eead4;
    color: #115e59;
}

.keyword-tag.resume-only:hover {
    box-shadow: 0 4px 12px rgba(17, 94, 89, 0.3);
}

.empty-state {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9rem;
}

/* Methodology */
.methodology {
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    box-shadow: var(--shadow-md);
}

.methodology details {
    margin-bottom: 15px;
}

.methodology details summary {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: var(--surface-elevated);
    border-left: 4px solid var(--primary-color);
}

.methodology details summary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    transform: translateX(5px);
}

.methodology details[open] summary {
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.methodology-content {
    padding: 20px;
    color: var(--text-secondary);
    background: var(--surface-elevated);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.methodology-content p {
    margin-bottom: 14px;
    line-height: 1.8;
}

.methodology-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.methodology-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.methodology-content code {
    display: block;
    background: var(--bg-primary);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-family: 'Courier New', monospace;
    border-left: 4px solid var(--primary-color);
    font-size: 0.95rem;
    color: var(--text-primary);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.methodology-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Error Message */
.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #fca5a5;
    color: #991b1b;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.15);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 2px solid var(--border-color);
    margin-top: 80px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
}

footer p {
    margin: 0;
    font-weight: 500;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
    .input-section {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .ai-results-grid {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

    .score-value {
        font-size: 3.5rem;
    }
    
    .result-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 640px) {
    .container {
        padding: 12px;
    }

    header {
        padding: 35px 20px;
        margin-bottom: 30px;
        border-radius: 12px;
    }

    header h1 {
        font-size: 1.85rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }

    .api-key-section {
        max-width: 100%;
        margin-top: 20px;
    }

    .file-upload-section {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .file-upload-btn {
        text-align: center;
        width: 100%;
    }

    .action-section {
        flex-direction: column;
        gap: 12px;
    }

    button {
        width: 100%;
        padding: 14px 24px;
    }
    
    .analyze-btn {
        padding: 16px 32px;
    }

    .score-value {
        font-size: 3rem;
    }
    
    .score-label {
        font-size: 1.1rem;
    }

    .result-card {
        padding: 24px;
    }

    .ai-card {
        padding: 20px;
    }
    
    .ai-section-title {
        font-size: 1.5rem;
    }
    
    .methodology {
        padding: 20px;
    }
    
    .keyword-tag {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* AI Toggle Section */
.ai-toggle-section {
    text-align: center;
    margin: 20px 0 30px;
    padding: 20px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

.ai-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.ai-toggle-label:hover {
    color: var(--primary-color);
}

.ai-toggle-label input[type='checkbox'] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

