/* ============================================
   Meeting Cost Calculator - Styles
   ============================================ */

/* CSS Variables */
:root {
    /* Light Mode Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-money: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-light: #312e81;
    --border: #334155;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.theme-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.theme-toggle:active .theme-icon {
    transform: rotate(360deg);
}

/* Container */
.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    position: relative;
}

.emoji-float {
    display: inline-block;
    animation: float 2s ease-in-out infinite;
}

/* Calculator Card */
.calculator-card {
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.label-icon {
    font-size: 1.125rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    padding: 0.5rem;
}

.input-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-btn:hover {
    background: var(--accent);
    color: white;
}

.input-btn:active {
    transform: scale(0.95);
}

.input-wrapper input {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: transparent;
    border: none;
    color: var(--text-primary);
    outline: none;
    width: 100%;
    -moz-appearance: textfield;
}

.input-wrapper input::-webkit-outer-spin-button,
.input-wrapper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Salary Presets */
.salary-presets {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.preset-btn {
    flex: 1;
    min-width: fit-content;
    padding: 0.625rem 1rem;
    border: 2px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.preset-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.salary-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.salary-input:focus {
    border-color: var(--accent);
}

/* Duration Presets */
.duration-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.duration-btn {
    flex: 1;
    min-width: fit-content;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.duration-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.duration-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

/* Pre-calculation Stats */
.pre-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
}

.stat-preview {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stat-preview.secondary .stat-value {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Start Button */
.start-btn {
    width: 100%;
    padding: 1.25rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: 1rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.start-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.btn-subtext {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Live Meeting Section */
.live-meeting {
    display: none;
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}

.live-meeting.active {
    display: block;
}

.meeting-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.live-cost-display {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cost-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.cost-value {
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-danger);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: costPulse 0.5s ease-in-out;
}

.cost-per-second {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--danger);
    margin-top: 0.5rem;
}

.money-particle {
    animation: shake 0.3s ease-in-out infinite;
}

.meeting-timer {
    text-align: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.timer-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.timer-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.meeting-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.control-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--border);
    background: var(--bg-tertiary);
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    border-color: var(--accent);
}

.control-btn.stop {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.control-btn.stop:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Fun Facts */
.fun-facts {
    padding: 1rem;
    background: var(--accent-light);
    border-radius: 1rem;
    text-align: center;
}

.fact-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fact-emoji {
    font-size: 1.5rem;
}

.fact-text {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 500;
}

/* Results Section */
.results-section {
    display: none;
    background: var(--bg-secondary);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: fadeInUp 0.4s ease-out;
}

.results-section.active {
    display: block;
}

.results-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.results-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: bounce 0.6s ease-out;
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.final-cost {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .final-cost {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
}

.final-label {
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.final-value {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--danger);
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-stat {
    text-align: center;
    padding: 1rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 1rem;
}

.stat-icon {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.stat-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shocking-comparison {
    padding: 1.25rem;
    background: var(--accent-light);
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.shocking-comparison p {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.shocking-comparison p:last-child {
    margin-bottom: 0;
}

.shocking-comparison strong {
    font-weight: 700;
}

/* Share Section */
.share-section {
    margin-bottom: 2rem;
}

.share-section h3 {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    flex: 1;
    min-width: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.linkedin:hover {
    background: #005e93;
}

.share-btn.twitter {
    background: #000;
    color: white;
}

.share-btn.twitter:hover {
    background: #333;
}

.share-btn.copy {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.share-btn.copy:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Email Capture */
.email-capture {
    padding: 2rem;
    background: var(--gradient-primary);
    border-radius: 1rem;
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
}

.email-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.email-capture h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.email-capture > p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.email-form {
    display: flex;
    gap: 0.5rem;
    max-width: 320px;
    margin: 0 auto;
}

.email-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    outline: none;
}

.email-form button {
    padding: 0.875rem 1.25rem;
    background: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

.email-form button:hover {
    transform: scale(1.02);
}

.btn-arrow {
    transition: transform 0.2s ease;
}

.email-form button:hover .btn-arrow {
    transform: translateX(2px);
}

.email-note {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.75rem;
}

.email-capture.success {
    background: var(--gradient-money);
}

.email-capture.success .email-form {
    display: none;
}

/* Reset Button */
.reset-btn {
    width: 100%;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer */
.footer {
    margin-top: 3rem;
    text-align: center;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.global-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.global-stat {
    text-align: center;
}

.global-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
}

.global-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    color: var(--success);
    font-weight: bold;
}

/* Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-size: 1.5rem;
    animation: fall 2s ease-in forwards;
    opacity: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

@keyframes costPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

@keyframes bounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fall {
    0% {
        opacity: 1;
        transform: translateY(-20px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 1rem 0.75rem 3rem;
    }

    .calculator-card,
    .live-meeting,
    .results-section {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }

    .salary-presets,
    .duration-presets {
        gap: 0.375rem;
    }

    .preset-btn,
    .duration-btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }

    .input-btn {
        width: 40px;
        height: 40px;
    }

    .results-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .result-stat {
        padding: 0.75rem 0.25rem;
    }

    .stat-number {
        font-size: 1rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
    }

    .email-form {
        flex-direction: column;
    }

    .email-form input,
    .email-form button {
        width: 100%;
    }

    .global-stats {
        gap: 1rem;
    }
}

/* Print Styles */
@media print {
    .theme-toggle,
    .share-section,
    .email-capture,
    .reset-btn,
    .meeting-controls,
    .footer {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .results-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
