/* assets/css/style.css */
:root {
    --bg-dark: #0a0a0f;
    --primary-neon: #00f0ff;
    --secondary-neon: #ff003c;
    --text-main: #ffffff;
    --text-muted: #a0a0b0;
    --glass-bg: rgba(25, 25, 35, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow-spread: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

/* Background Animations */
.bg-animated {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle at center, #1a1a2e 0%, var(--bg-dark) 100%);
    z-index: -2;
}

.floating-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

.orb-1 {
    width: 300px; height: 300px;
    background: var(--primary-neon);
    top: -10%; left: -10%;
}

.orb-2 {
    width: 400px; height: 400px;
    background: var(--secondary-neon);
    bottom: -10%; right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}

/* App Container */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}
.screen.active {
    display: block;
}
.screen.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography & Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.glitch {
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255,0,0,0.75),
                -0.025em -0.05em 0 rgba(0,255,0,0.75),
                0.025em 0.05em 0 rgba(0,0,255,0.75);
    animation: glitch 500ms infinite;
}

@keyframes glitch {
    0% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,0,0.75), -0.025em 0.05em 0 rgba(0,0,255,0.75); }
    14% { text-shadow: 0.05em 0 0 rgba(255,0,0,0.75), -0.05em -0.025em 0 rgba(0,255,0,0.75), -0.025em 0.05em 0 rgba(0,0,255,0.75); }
    15% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,0,0.75), -0.05em -0.05em 0 rgba(0,0,255,0.75); }
    49% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,0.75), 0.025em 0.025em 0 rgba(0,255,0,0.75), -0.05em -0.05em 0 rgba(0,0,255,0.75); }
    50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,0,0.75), 0 -0.05em 0 rgba(0,0,255,0.75); }
    99% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,0.75), 0.05em 0 0 rgba(0,255,0,0.75), 0 -0.05em 0 rgba(0,0,255,0.75); }
    100% { text-shadow: -0.025em 0 0 rgba(255,0,0,0.75), -0.025em -0.025em 0 rgba(0,255,0,0.75), -0.025em -0.05em 0 rgba(0,0,255,0.75); }
}

.subtitle {
    color: var(--primary-neon);
    font-weight: 500;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: box-shadow 0.3s ease;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"], input[type="date"] {
    width: 100%;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    touch-action: manipulation;
}

input[type="text"]:focus, input[type="date"]:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Custom Toggle */
.toggle-container {
    display: flex;
    gap: 10px;
}

.toggle-container input[type="radio"] {
    display: none;
}

.toggle-btn {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

#mode-hype:checked + .hype-btn {
    background: linear-gradient(45deg, #ff00cc, #3333ff);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 0, 204, 0.5);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

#mode-roast:checked + .roast-btn {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    border-color: transparent;
    box-shadow: 0 0 15px rgba(255, 65, 108, 0.5);
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* Glitch Button Styling */
.glitch-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    background: transparent;
    border: 2px solid var(--primary-neon);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.3);
    touch-action: manipulation;
    user-select: none;
}

.glitch-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.6), inset 0 0 20px rgba(0, 240, 255, 0.6);
}

.glitch-text {
    position: relative;
    display: inline-block;
    z-index: 2;
}

.glitch-btn:hover .glitch-text {
    animation: textGlitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

.glitch-btn::before, .glitch-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-neon);
    z-index: -1;
    opacity: 0;
}

@keyframes textGlitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}

/* Scanner Screen */
.scanner-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
}

.scanner-ring {
    width: 150px;
    height: 150px;
    border: 4px solid rgba(0, 240, 255, 0.2);
    border-top: 4px solid var(--primary-neon);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
    margin-bottom: 2rem;
}

.scanner-beam {
    position: absolute;
    width: 100px;
    height: 2px;
    background: var(--primary-neon);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px 5px var(--primary-neon);
    animation: scan 2s ease-in-out infinite alternate;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes scan { 
    0% { top: 20%; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 80%; opacity: 0; }
}

.pulsing-text {
    font-size: 2rem;
    animation: pulse 1.5s infinite;
}
.loading-subtext {
    color: var(--text-muted);
    margin-top: 1rem;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; text-shadow: 0 0 10px var(--primary-neon); }
    100% { opacity: 0.6; }
}

/* Result Card */
.result-card {
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    background: rgba(15, 15, 20, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.result-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

.card-header, .aura-details, .reading-section {
    position: relative;
    z-index: 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

/* Circular Progress */
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 80px;
    max-height: 80px;
}
.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3.8;
}
.circle {
    fill: none;
    stroke: var(--primary-neon);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-out;
}
.percentage {
    fill: white;
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: bold;
}

.aura-score {
    text-align: center;
}
.aura-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.aura-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-box {
    flex: 1;
    background: rgba(0,0,0,0.3);
    padding: 1rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.detail-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.detail-box .value {
    font-weight: bold;
    font-size: 1.1rem;
}
.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-top: 0.5rem;
    box-shadow: 0 0 10px currentColor;
}

.reading-section {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}
.reading-section h3 {
    font-size: 1rem;
    color: var(--primary-neon);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.reading-section h3::before {
    content: '⚡';
    font-size: 1.2rem;
}
.reading-section p {
    line-height: 1.7;
    font-size: 1.1rem;
    color: #f0f0f0;
    background: rgba(0, 0, 0, 0.4);
    padding: 1.2rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-neon);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.neon-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(90deg, #ff00cc, #3333ff, #00f0ff, #ff00cc);
    background-size: 300%;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    animation: neonFlow 5s linear infinite;
    box-shadow: 0 0 20px rgba(255, 0, 204, 0.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.neon-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

@keyframes neonFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.secondary-action {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 1rem;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}
.secondary-action:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: white;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Watermark */
.watermark {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2rem;
    font-weight: 500;
}
.watermark.hidden {
    display: none;
}

/* --- Mobile Optimization (Phone View) --- */
@media (max-width: 480px) {
    .app-container {
        padding: 0.5rem;
    }
    
    .glitch {
        font-size: 2.2rem;
    }

    .glass-card {
        padding: 1.5rem 1rem;
        border-radius: 15px;
    }

    .result-card {
        padding: 1.5rem 1rem;
    }

    .aura-details {
        flex-direction: column;
        gap: 0.8rem;
    }

    .reading-section p {
        font-size: 1rem;
        padding: 1rem;
    }

    .neon-btn, .glitch-btn, .secondary-action {
        padding: 1rem;
        font-size: 1rem;
    }

    .toggle-btn {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }

    header {
        margin-bottom: 1.5rem;
    }
}
