* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    line-height: 1.6;
    color: #e8e8e8;
    background: #1a1a1a;
    font-size: 18px;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dollar Bills Container */
.dollar-bills-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.dollar-bill {
    position: absolute;
    width: 150px;
    height: auto;
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

/* Background gradients */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(32, 16, 22, 0.6) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(32, 22, 18, 0.5) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(28, 18, 32, 0.4) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Noise texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 3;
}

/* Home link */
.home-link {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: #888;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    font-size: 14px;
    text-decoration: none;
    z-index: 10;
    opacity: 1;
    cursor: pointer;
}

.home-link:hover {
    color: #aaa;
}

.page {
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 4;
}

/* Typography */
h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1rem;
    text-align: center;
}

.tagline {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #aaa;
}

/* Screen transitions */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Setup Screen */
.input-section {
    background: rgba(42, 42, 42, 0.6);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

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

.input-group:last-child {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency {
    font-size: 1.5rem;
    color: #ffd93d;
}

input[type="number"],
input[type="text"]#annualSalary {
    flex: 1;
    padding: 0.75rem;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    background: #2a2a2a;
    color: #e8e8e8;
    border: 2px solid #e8e8e8;
    border-radius: 4px;
}

input[type="number"]:focus,
input[type="text"]#annualSalary:focus {
    outline: none;
    border-color: #ffd93d;
}

small {
    display: block;
    margin-top: 0.25rem;
    color: #888;
    font-size: 0.85rem;
}

.or-divider {
    text-align: center;
    color: #666;
    margin: 1rem 0;
    font-style: italic;
}

/* Privacy Notice */
.privacy-notice {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0.75rem 1rem;
    background: rgba(107, 207, 127, 0.08);
    border: 1px solid rgba(107, 207, 127, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #a8d5b3;
    line-height: 1.4;
}

.privacy-icon {
    display: inline-block;
    margin-right: 0.4rem;
    font-style: normal;
}

.privacy-text {
    font-style: italic;
}

.sound-toggle {
    text-align: center;
    margin: 2rem 0;
}

.sound-toggle label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.sound-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Salary Feedback */
.salary-feedback {
    text-align: center;
    font-size: 1.1rem;
    color: #ffd93d;
    margin: 0.75rem 0 0.5rem 0;
    min-height: 0;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.salary-feedback.visible {
    opacity: 1;
    animation: feedbackPulse 0.5s ease;
}

.salary-feedback.loading {
    color: #c084fc;
}

.salary-feedback .loading-emoji {
    display: inline-block;
    animation: spinMoney 0.6s linear infinite;
    font-style: normal;
}

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

@keyframes spinMoney {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.big-button {
    display: block;
    width: 100%;
    padding: 1.5rem;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    background: #ffd93d;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.big-button:hover {
    background: #ffe066;
    transform: translateY(-2px);
}

.big-button:active {
    transform: translateY(0);
}

/* Timer Screen */
.money-display {
    text-align: center;
    margin: 3rem 0;
}

.money-label {
    font-size: 1.2rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.money-amount {
    font-size: 5rem;
    color: #6bcf7f;
    font-weight: 700;
    margin: 1rem 0;
    letter-spacing: 0.05em;
}

.char {
    display: inline-block;
    position: relative;
}

.time-elapsed {
    font-size: 1.5rem;
    color: #888;
}

/* Milestone Progress */
.milestone-progress {
    margin: 2rem 0;
    text-align: center;
}

.next-milestone {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(42, 42, 42, 0.6);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #e8e8e8;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b9d, #ffd93d, #6bcf7f, #7dd3fc);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 15px;
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.control-button {
    padding: 1rem 2rem;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    background: #e8e8e8;
    color: #1a1a1a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.control-button:hover {
    background: #fff;
    transform: translateY(-2px);
}

.control-button.secondary {
    background: rgba(232, 232, 232, 0.3);
    color: #e8e8e8;
}

.control-button.secondary:hover {
    background: rgba(232, 232, 232, 0.5);
}

/* Control Button Tooltips */
.control-button[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(42, 42, 42, 0.95);
    color: #6bcf7f;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid #6bcf7f;
    z-index: 1000;
}

.control-button[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.control-button[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #6bcf7f;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.control-button[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Achievement Display */
.achievement-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

.achievement {
    background: rgba(42, 42, 42, 0.95);
    border: 3px solid #ffd93d;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    animation: achievementPop 0.5s ease;
}

.achievement-title {
    font-size: 2rem;
    color: #ffd93d;
    margin-bottom: 0.5rem;
}

.achievement-subtitle {
    font-size: 1.2rem;
    color: #6bcf7f;
}

@keyframes achievementPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Motivational Messages */
.motivational-message {
    text-align: center;
    font-size: 1.5rem;
    color: #ff6b9d;
    margin: 2rem 0;
    min-height: 2rem;
    animation: messageFade 0.5s ease;
}

@keyframes messageFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* News Ticker */
.news-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 217, 61, 0.95);
    color: #1a1a1a;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 2px solid #1a1a1a;
    z-index: 99;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.news-ticker.visible {
    opacity: 1;
    transform: translateY(0);
}

.news-ticker::before {
    content: '📰 BREAKING: ';
    font-weight: bold;
}

/* Celebration Container */
.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.floating-money {
    position: absolute;
    font-size: 3rem;
    animation: floatUp 2s ease-out forwards;
}

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

/* Screen shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s;
}

/* Bottom Controls */
.bottom-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.icon-button {
    padding: 0.75rem 1.5rem;
    font-size: 1.5rem;
    background: rgba(232, 232, 232, 0.2);
    color: #e8e8e8;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.icon-button:hover {
    background: rgba(232, 232, 232, 0.3);
    transform: translateY(-2px);
}

/* Custom Tooltip */
.icon-button[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(42, 42, 42, 0.95);
    color: #ffd93d;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'Special Elite', 'Courier New', Courier, monospace;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid #ffd93d;
    z-index: 1000;
}

.icon-button[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* Tooltip arrow */
.icon-button[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ffd93d;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.icon-button[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #2a2a2a;
    border: 3px solid #e8e8e8;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #e8e8e8;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.close-button {
    background: none;
    border: none;
    color: #e8e8e8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.close-button:hover {
    color: #ff6b9d;
}

/* Achievements List */
.achievements-list {
    padding: 1.5rem;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(42, 42, 42, 0.6);
    border-radius: 8px;
    border: 2px solid #6bcf7f;
}

.achievement-item.locked {
    opacity: 0.4;
    border-color: #666;
}

.achievement-item .icon {
    font-size: 2rem;
}

.achievement-item .details {
    flex: 1;
}

.achievement-item .name {
    font-size: 1.2rem;
    color: #ffd93d;
    margin-bottom: 0.25rem;
}

.achievement-item .amount {
    font-size: 1rem;
    color: #6bcf7f;
}

.achievement-item.locked .name,
.achievement-item.locked .amount {
    color: #888;
}

/* Settings Content */
.settings-content {
    padding: 1.5rem;
}

.setting-section {
    margin-bottom: 2rem;
}

.setting-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffd93d;
}

.color-options,
.font-options,
.progress-bar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-item {
    padding: 0.75rem 1.5rem;
    background: rgba(42, 42, 42, 0.6);
    border: 2px solid #666;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
    color: #e8e8e8;
    position: relative;
    padding-right: 2.5rem;
}

.option-item:hover:not(.locked) {
    border-color: #ffd93d;
    transform: translateY(-2px);
}

.option-item.active {
    border-color: #6bcf7f;
    background: rgba(107, 207, 127, 0.2);
}

.option-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

/* Speech Bubble */
.speech-bubble {
    position: fixed;
    bottom: 80px;
    right: 20px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 98;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.speech-bubble.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 40px;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid rgba(255, 255, 255, 0.95);
}

/* Unlock Teaser */
.unlock-teaser {
    text-align: center;
    font-size: 0.9rem;
    color: #ffd93d;
    margin: 1rem 0;
    min-height: 1.5rem;
    animation: messageFade 0.5s ease;
}

/* Font style options */
.font-courier { font-family: 'Courier New', Courier, monospace; }
.font-special-elite { font-family: 'Special Elite', 'Courier New', Courier, monospace; }
.font-mono { font-family: 'Monaco', 'Consolas', monospace; }
.font-terminal { font-family: 'Lucida Console', Monaco, monospace; }

/* Fun & playful fonts */
.font-bangers { font-family: 'Bangers', cursive; }
.font-dynapuff { font-family: 'Dynapuff', cursive; }
.font-indie-flower { font-family: 'Indie Flower', cursive; }
.font-permanent-marker { font-family: 'Permanent Marker', cursive; }

/* Futuristic & quirky fonts */
.font-audiowide { font-family: 'Audiowide', sans-serif; }
.font-bungee-shade { font-family: 'Bungee Shade', cursive; }

/* Luxury & elegant fonts */
.font-playfair { font-family: 'Playfair Display', serif; }
.font-cinzel { font-family: 'Cinzel Decorative', serif; }
.font-italiana { font-family: 'Italiana', serif; }

/* Spooky font (for fun contrast!) */
.font-creepster { font-family: 'Creepster', cursive; }

/* Responsive */
@media (max-width: 768px) {
    .page {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    .money-amount {
        font-size: 3rem;
    }

    .controls {
        flex-direction: column;
    }

    .control-button {
        width: 100%;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-width: 100%;
    }

    .speech-bubble {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .speech-bubble::after {
        right: 50%;
        transform: translateX(50%);
    }
}
