/* ⭐ SourSafe Gen Z Glassmorphism Styles */

:root {
    /* Pastel Neon Colors */
    --neon-pink: #ff6ec7;
    --neon-purple: #b794f6;
    --neon-blue: #63b3ed;
    --neon-cyan: #4fd1c5;
    --neon-green: #68d391;
    --neon-yellow: #f6e05e;
    --neon-orange: #f6ad55;
    
    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    
    /* Dark Mode Base */
    --bg-dark: #0f0f23;
    --bg-gradient-1: #1a1a3e;
    --bg-gradient-2: #16213e;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-gradient-1) 50%, var(--bg-gradient-2) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 110, 199, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(99, 179, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(183, 148, 246, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ========== Header ========== */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-title {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple), var(--neon-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

.subtitle {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ========== Navigation Steps ========== */
.step-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.step:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

.step.active {
    opacity: 1;
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 30px rgba(79, 209, 197, 0.3);
}

.step-icon {
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========== Glass Cards ========== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px var(--glass-shadow);
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ========== Input Groups ========== */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.unit-chip {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-orange));
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(255, 110, 199, 0.4);
    animation: glow 2s ease-in-out infinite;
}

/* Info Icon */
.info-icon {
    display: inline-block;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.3rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    position: relative;
}

.info-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.info-icon::after {
    content: attr(data-info);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 4px 12px rgba(79, 209, 197, 0.3);
}

.info-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 110, 199, 0.4); }
    50% { box-shadow: 0 0 25px rgba(255, 110, 199, 0.6); }
}

.input-group input,
.input-group select {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(79, 209, 197, 0.3);
    transform: scale(1.02);
}

.input-group input:hover,
.input-group select:hover {
    border-color: var(--neon-purple);
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}


/* ========== Buttons ========== */
.btn-primary,
.btn-secondary {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 110, 199, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--neon-cyan);
    transform: translateY(-3px);
}

.button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ========== Step Content ========== */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
}

/* ========== Results Section ========== */
.results-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.calc-result {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 110, 199, 0.1), rgba(183, 148, 246, 0.1));
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calc-result.wide {
    grid-column: 1 / -1;
}

.calc-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.calc-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.calc-value.classification {
    font-size: 1.8rem;
}

/* ========== Chart Container ========== */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1rem;
}

.region-info {
    text-align: center;
    padding: 1rem;
}

.region-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 20px rgba(183, 148, 246, 0.4);
}

#region-description {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ========== Mechanism Cards ========== */
.mechanism-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mechanism-card:hover {
    transform: translateX(5px);
    border-color: var(--neon-cyan);
}

.mechanism-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.mechanism-header h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.risk-badge {
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.risk-badge.low {
    background: linear-gradient(135deg, #68d391, #48bb78);
    color: white;
}

.risk-badge.moderate {
    background: linear-gradient(135deg, #f6e05e, #ecc94b);
    color: #2d3748;
}

.risk-badge.high {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
}

.mechanism-triggers {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== Hints Container ========== */
.hints-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hint-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(104, 211, 145, 0.1), rgba(79, 209, 197, 0.1));
    border-radius: 12px;
    border-left: 4px solid var(--neon-green);
}

.hint-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ========== Material Recommendations ========== */
.material-recommendation {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(183, 148, 246, 0.1), rgba(99, 179, 237, 0.1));
    border-radius: 15px;
    border: 2px solid rgba(183, 148, 246, 0.3);
}

.material-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--neon-purple);
}

.material-list {
    margin-bottom: 1rem;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--text-primary);
}

.material-justification {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 1rem;
    border-left: 3px solid var(--neon-cyan);
}

.justification-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--neon-cyan);
}

.justification-text {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ========== AI Section ========== */
.ai-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ai-response {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(183, 148, 246, 0.1), rgba(255, 110, 199, 0.1));
    border-radius: 15px;
    border: 2px solid rgba(183, 148, 246, 0.3);
}

.ai-thinking {
    text-align: center;
    padding: 2rem;
}

.thinking-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.thinking-dots span {
    width: 12px;
    height: 12px;
    background: var(--neon-purple);
    border-radius: 50%;
    animation: thinking 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.ai-text {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
}

/* ========== Footer ========== */
.app-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.disclaimer {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
    
    .calc-grid {
        grid-template-columns: 1fr;
    }
    
    .step-nav {
        gap: 1rem;
    }
    
    .step {
        padding: 0.75rem 1rem;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* ========== Select Dropdown Styling ========== */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234fd1c5' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
}
