/* Tech Lifespan Calculator - Glassmorphism Theme */
/* Inspiré de lowforehead.tech */

:root {
    /* Couleurs principales */
    --primary: #00ff88;
    --secondary: #00ccff;
    --accent: #ff00ff;
    --dark: #0a0a0a;
    --darker: #050505;

    /* Glass effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Animations */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 2rem;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 204, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 0, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    animation: bgPulse 15s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Header */
.header-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    box-shadow: var(--glass-shadow);
}

.header-glass h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logo-header {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.4));
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.4)); }
    50% { filter: drop-shadow(0 0 30px rgba(0, 204, 255, 0.6)); }
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
}

/* Progress bar */
.progress-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 25%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.step {
    text-align: center;
    padding: 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.step.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    border-color: transparent;
}

.step.completed {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
    border-color: var(--primary);
}

/* Form styles */
.calculator-form {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--glass-shadow);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeSlideIn 0.5s ease-out;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.form-step h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-subtitle {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

/* Device type cards */
.device-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.device-card {
    cursor: pointer;
}

.device-card input[type="radio"] {
    display: none;
}

.device-card .card-content {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.device-card:hover .card-content {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.device-card input[type="radio"]:checked + .card-content {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 255, 0.1));
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.device-card .icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.device-card .label {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
}

/* Form groups */
.form-group {
    margin: 1.5rem 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
}

.form-group select,
.form-group input[type="month"],
.form-group input[type="text"] {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.form-group select option {
    background: #1a1a2e;
    color: #fff;
}

.sub-form {
    margin-top: 2rem;
}

/* Usage cards */
.usage-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.usage-card {
    cursor: pointer;
}

.usage-card input[type="radio"] {
    display: none;
}

.usage-card .card-content {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: var(--transition-smooth);
    height: 100%;
}

.usage-card:hover .card-content {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.usage-card input[type="radio"]:checked + .card-content {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 204, 255, 0.1));
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.usage-card .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.usage-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.usage-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 255, 136, 0.2);
    color: var(--primary);
}

.badge.warning {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
}

.badge.danger {
    background: rgba(255, 0, 100, 0.2);
    color: #ff0064;
}

/* Condition slider */
.condition-slider-container {
    padding: 2rem 0;
}

#conditionSlider {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    margin: 2rem 0;
}

#conditionSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

#conditionSlider::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    cursor: pointer;
    border: none;
}

.condition-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.condition-labels span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.condition-labels span.active {
    color: var(--primary);
    font-weight: 600;
    transform: scale(1.1);
}

.condition-description {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
}

.condition-description p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Symptoms grid */
.symptoms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.symptom-checkbox {
    cursor: pointer;
}

.symptom-checkbox input[type="checkbox"] {
    display: none;
}

.symptom-checkbox .checkbox-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

.symptom-checkbox:hover .checkbox-content {
    border-color: var(--primary);
    transform: translateX(5px);
}

.symptom-checkbox input[type="checkbox"]:checked + .checkbox-content {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.symptom-checkbox .icon {
    font-size: 1.5rem;
}

.symptom-checkbox .text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
}

button {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
    flex: 1;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.5);
}

.btn-prev {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-prev:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-3px);
}

/* Loading screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-screen.hidden {
    display: none;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

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

.loading-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-content p {
    color: rgba(255, 255, 255, 0.6);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .header-glass h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-header {
        width: 100px;
        height: 100px;
    }

    .device-type-grid,
    .usage-cards {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-form {
        padding: 2rem 1.5rem;
    }

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

    .symptoms-grid {
        grid-template-columns: 1fr;
    }
}
