/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff !important;
    min-height: 100vh;
    overflow: hidden;
    line-height: 1.6;
    color: #000000 !important;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0 2px 2px 0;
}

/* Screen Container */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #ffffff !important;
    color: #000000 !important;
}

.screen.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.screen.slide-up {
    transform: translateY(-100%);
    opacity: 0;
}

.content {
    text-align: center;
    max-width: 600px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    color: #000000 !important;
}

/* Typography */
.main-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.question-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 2rem;
    color: #000000 !important;
}

.microcopy {
    color: #000000 !important;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    font-weight: 400;
}

/* Question Section for Landing Screen */
.question-section {
    margin: 2rem 0;
}

.question-section .question-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 1.5rem;
}

/* Input Styles */
.input-container {
    position: relative;
    margin-bottom: 1rem;
}

.main-input, .question-input {
    width: 100%;
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #ffffff !important;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    color: #000000 !important;
}

.main-input:focus, .question-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: #ffffff !important;
    color: #000000 !important;
}

.main-input::placeholder, .question-input::placeholder {
    color: #666666 !important;
    font-weight: 400;
}

/* Cursor Animation */
.cursor-blink {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 1.5rem;
    background: #667eea;
    animation: blink 1.2s infinite;
    opacity: 0;
}

.main-input:focus + .cursor-blink {
    opacity: 1;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Buttons */
.continue-btn, .share-btn, .retry-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
}

.continue-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.continue-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Screen */
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000000 !important;
}

.loading-subtext {
    color: #000000 !important;
    font-size: 1rem;
}

/* Result Screen - New Clean Design */
#resultScreen {
    background: #000000 !important;
    color: #ffffff !important;
    padding: 20px 20px;
}

/* Force white text on result screen - EXCEPT prediction text */
#resultScreen,
#resultScreen .content,
#resultScreen .content *,
#resultScreen h1,
#resultScreen h2,
#resultScreen p,
#resultScreen div,
#resultScreen span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Override for prediction text to be green */
#resultScreen .prediction-text,
#resultScreen #predictionText,
#predictionText,
.prediction-text {
    color: #00FF00 !important;
    -webkit-text-fill-color: #00FF00 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.result-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 30px 20px;
}

/* Main Title */
.obsolescence-title {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 0.5rem !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    letter-spacing: -0.02em;
}

.obsolescence-subtitle {
    font-size: 1.2rem !important;
    font-weight: 300 !important;
    color: #cccccc !important;
    -webkit-text-fill-color: #cccccc !important;
    margin-bottom: 2.5rem !important;
}

/* Progress Section */
.progress-section {
    margin: 2.5rem 0 !important;
}

.progress-label {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    margin-bottom: 1rem !important;
    text-align: left !important;
}

.progress-display {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

.progress-bar-container {
    flex: 1 !important;
    height: 10px !important;
    background: #2a2a2a !important;
    border-radius: 5px !important;
    overflow: hidden !important;
    border: 1px solid #444444 !important;
}

.progress-bar-fill {
    height: 100% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 4px !important;
    width: 0% !important;
    transition: width 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.4) !important;
    position: relative !important;
}

.progress-percentage {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    min-width: 50px !important;
}

/* Countdown Section */
.countdown-section {
    margin: 3rem 0 !important;
}

.countdown-label {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    margin-bottom: 1.5rem !important;
}

.countdown-display {
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin: 1.5rem 0 !important;
    flex-wrap: wrap !important;
}

.countdown-item {
    background: #1a1a1a !important;
    border-radius: 8px !important;
    padding: 1rem 0.8rem !important;
    min-width: 75px !important;
    border: 1px solid #333333 !important;
}

.countdown-number {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    line-height: 1 !important;
    margin-bottom: 0.3rem !important;
}

.countdown-unit {
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    color: #888888 !important;
    -webkit-text-fill-color: #888888 !important;
    letter-spacing: 0.05em !important;
}

/* Main Replacement Message */
.replacement-message {
    margin-bottom: 3rem !important;
}

.replacement-title {
    font-size: 2.5rem !important;
    font-weight: 400 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    margin-bottom: 1rem !important;
    letter-spacing: -0.02em;
}

.replacement-year {
    font-size: 2.5rem !important;
    font-weight: 400 !important;
    color: #4A90E2 !important;
    -webkit-text-fill-color: #4A90E2 !important;
    line-height: 1 !important;
}

/* Optional text styling */
.optional-text {
    font-size: 0.35em;
    font-weight: 400;
    color: #666666 !important;
    opacity: 0.8;
}

/* Prediction Section - No Background */
.prediction-section {
    margin: 2.5rem 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    border: none !important;
}

.prediction-text {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #00FF00 !important;
    -webkit-text-fill-color: #00FF00 !important;
    text-align: center !important;
    font-style: italic !important;
    font-weight: 400 !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Action Buttons - Perfect alignment */
.result-actions {
    display: flex !important;
    gap: 1.5rem !important;
    justify-content: center !important;
    align-items: stretch !important;
    margin-top: 2.5rem !important;
}

.doom-btn, .retry-btn {
    padding: 0 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 180px !important;
    height: 44px !important;
    border: none !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    text-align: center !important;
    line-height: 1 !important;
    margin: 0 !important;
    vertical-align: top !important;
}

.doom-btn:hover, .retry-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
}

/* Responsive Design for Result Screen */
@media (max-width: 1024px) {
    .result-container {
        padding: 25px 20px;
    }
    
    .obsolescence-title {
        font-size: 2.2rem !important;
    }
    
    .countdown-display {
        gap: 0.8rem !important;
    }
    
    .countdown-item {
        min-width: 65px !important;
        padding: 0.8rem 0.6rem !important;
    }
    
    .countdown-number {
        font-size: 1.5rem !important;
    }
    
    .countdown-unit {
        font-size: 0.6rem !important;
    }
}

@media (max-width: 768px) {
    #resultScreen {
        padding: 10px 15px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 100vh !important;
        height: auto !important;
    }
    
    .result-container {
        padding: 10px 15px 80px 15px !important;
        min-height: auto !important;
        width: 100% !important;
    }
    
    .replacement-message {
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .replacement-title {
        font-size: 1.4rem !important;
        margin-bottom: 0.5rem !important;
        margin-top: 0 !important;
        line-height: 1.2 !important;
    }
    
    .replacement-year {
        font-size: 2.4rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1 !important;
    }
    
    .countdown-section {
        margin: 1rem 0 !important;
    }
    
    .countdown-display {
        gap: 0.4rem !important;
        margin: 0.8rem 0 !important;
    }
    
    .countdown-item {
        min-width: 50px !important;
        padding: 0.5rem 0.3rem !important;
    }
    
    .countdown-number {
        font-size: 1.1rem !important;
    }
    
    .countdown-unit {
        font-size: 0.5rem !important;
    }
    
    .progress-section {
        margin: 1.2rem 0 !important;
    }
    
    .progress-display {
        gap: 1rem !important;
    }
    
    .result-actions {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        margin-top: 1.8rem !important;
        margin-bottom: 2rem !important;
    }
    
    .doom-btn, .retry-btn {
        width: 100% !important;
        max-width: 280px !important;
        height: 46px !important;
        font-size: 0.9rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        line-height: 1 !important;
    }
    
    .prediction-section {
        padding: 0.8rem 0 !important;
        margin: 1.2rem 0 !important;
    }
    
    .prediction-text {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        padding: 0 10px !important;
    }
    
    /* Email screen button fixes */
    #screen8 .result-actions,
    #screen8 .content > div:last-child {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: center !important;
    }
    
    #screen8 .continue-btn {
        width: 100% !important;
        max-width: 280px !important;
        height: 48px !important;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        padding: 0 1rem;
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .question-title {
        font-size: 2rem;
        color: #000000 !important;
    }
    
    .question-section .question-title {
        font-size: 1.5rem;
    }
    
    .main-input, .question-input {
        font-size: 1.1rem;
        padding: 1.25rem 1rem;
        color: #000000 !important;
    }
    
    .result-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .continue-btn, .share-btn, .retry-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .question-title {
        font-size: 1.5rem;
        color: #000000 !important;
    }
    
    .question-section .question-title {
        font-size: 1.3rem;
    }
    
    .result-card {
        padding: 1.5rem 1rem;
    }
}

/* Dark mode styles (for potential future implementation) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: #ecf0f1;
    }
    
    .main-title, .question-title, .result-title {
        color: #ecf0f1;
    }
    
    .main-input, .question-input {
        background: rgba(52, 73, 94, 0.8);
        border-color: #555;
        color: #ecf0f1;
    }
    
    .result-card {
        background: rgba(52, 73, 94, 0.9);
    }
    
    .prediction-text {
        background: rgba(44, 62, 80, 0.8);
        color: #ecf0f1;
    }
} 