:root {
    --bg-color: #020202;
    --accent-red: #ff0000;
    --accent-red-glow: rgba(255, 0, 0, 0.4);
    --text-white: #ffffff;
    --text-gray: #888888;
    --glass-bg: rgba(15, 15, 15, 0.75);
    --glass-border: rgba(255, 255, 255, 0.1);
    --eligible-green: #00ff00;
    --eligible-glow: rgba(0, 255, 0, 0.2);
    --gold: #ffd700;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    height: auto;
    width: 100%;
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(255, 0, 0, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(255, 0, 0, 0.05) 0%, transparent 40%),
        linear-gradient(to right, rgba(0,0,0,0.9) 10%, rgba(0,0,0,0.4)), 
        url('./background.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    padding: 3rem 6rem;
}

header {
    height: 80px;
    display: flex;
    align-items: center;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.diamond {
    width: 25px;
    height: 25px;
    background: var(--accent-red);
    transform: rotate(45deg);
    box-shadow: 0 0 15px var(--accent-red);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--accent-red);
    letter-spacing: 2px;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
}

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 4rem;
    font-style: italic;
    margin-bottom: 1rem;
    letter-spacing: 4px;
}

.subtitle {
    color: var(--text-gray);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Checker Card */
.checker-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 15px;
    max-width: 550px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.checker-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    box-shadow: 0 0 15px var(--accent-red);
}

.checker-card label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-white);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.input-wrapper {
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 0 10px rgba(255, 0, 0, 0.1);
}

input[type="text"] {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    padding: 1.2rem;
    font-size: 1.1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.error-msg {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.input-error {
    border-color: #ff4d4d !important;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#check-btn {
    width: 100%;
    background: linear-gradient(135deg, #111, #333);
    border: 1px solid #444;
    color: white;
    padding: 1.2rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#check-btn:hover {
    background: linear-gradient(135deg, #222, #444);
    box-shadow: 0 0 20px rgba(255, 26, 26, 0.2);
    border-color: var(--accent-red);
}

#check-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-red);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

#check-btn:hover::after {
    transform: scaleX(1);
}

/* Scanning Status */
#scanning-status {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pulse-container {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
}

.pulse-line {
    width: 3px;
    background: var(--accent-red);
    height: 100%;
    border-radius: 2px;
    animation: pulse 1s infinite ease-in-out;
}

.pulse-line:nth-child(1) { animation-delay: 0.0s; }
.pulse-line:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.pulse-line:nth-child(3) { animation-delay: 0.4s; height: 80%; }
.pulse-line:nth-child(4) { animation-delay: 0.6s; height: 40%; }
.pulse-line:nth-child(5) { animation-delay: 0.8s; height: 70%; }

@keyframes pulse {
    0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

.scanning-text {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--accent-red);
    font-weight: bold;
}

/* Visual Section Overlay */
.visual-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

#protocol-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 400px;
}

.protocol-content h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    transition: width 0.1s linear;
}

.protocol-steps {
    list-style: none;
}

.protocol-steps li {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.protocol-steps li.active {
    opacity: 1;
    color: white;
}

/* Result Cards */
.result-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    width: 450px;
    overflow: hidden;
    animation: slideIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    position: relative;
}

.result-card.eligible-glow {
    box-shadow: 0 0 40px var(--eligible-glow);
}

.result-card.not-eligible-glow {
    box-shadow: 0 0 40px var(--accent-red-glow);
}

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

.result-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.result-header.eligible {
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.1), transparent);
    border-bottom: 2px solid var(--eligible-green);
    color: var(--eligible-green);
}

.result-header.not-eligible {
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.1), transparent);
    border-bottom: 2px solid var(--accent-red);
    color: var(--accent-red);
}

.stars {
    margin-left: auto;
    color: #ffd700;
}

.result-body {
    padding: 2rem;
}

.result-body h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    font-style: italic;
    font-weight: 900;
}

.result-body p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.details {
    list-style: none;
    margin-bottom: 2rem;
}

.details li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.details li.highlight {
    color: #ffd700;
    font-weight: bold;
}

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.actions a {
    text-decoration: none;
    display: block;
    width: 100%;
}

.actions a button {
    width: 100%;
}

.btn-primary {
    background: var(--accent-red);
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #444;
    color: white;
    padding: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Footer */
footer {
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.supply-info {
    background: rgba(0,0,0,0.5);
    padding: 1.5rem 3rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.supply-count {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.supply-status {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 0.8rem;
}

.mini-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.mini-fill {
    width: 65%;
    height: 100%;
    background: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
    animation: supplyPulse 2s infinite ease-in-out;
}

@keyframes supplyPulse {
    0%, 100% { opacity: 0.8; width: 64%; }
    50% { opacity: 1; width: 66%; }
}

.hidden {
    display: none !important;
}

.btn-primary:disabled, .btn-secondary:disabled {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #555 !important;
    cursor: not-allowed;
    box-shadow: none !important;
    opacity: 0.6;
}

@media (max-width: 1024px) {
    #app { padding: 2rem 3rem; }
    .hero-section { grid-template-columns: 1fr; gap: 2rem; overflow-y: auto; }
    .hero-content { text-align: center; display: flex; flex-direction: column; align-items: center; }
    .hero-content h1 { font-size: 3rem; }
    .visual-section { margin-top: 2rem; }
    .checker-card, .result-card, #protocol-overlay { width: 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    #app { 
        padding: 1.5rem; 
        background-image: 
            linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), 
            url('./background.gif');
    }
    header { justify-content: center; height: 60px; margin-bottom: 2rem; }
    .hero-content h1 { font-size: 2.2rem; letter-spacing: 2px; }
    .subtitle { font-size: 1rem; margin-bottom: 2rem; }
    .checker-card { padding: 1.5rem; }
    .logo-text { font-size: 1.4rem; }
    .diamond { width: 18px; height: 18px; }
    .result-body h2 { font-size: 1.4rem; }
    .actions { grid-template-columns: 1fr; }
    footer { padding: 1rem 0; height: auto; }
    .supply-info { padding: 1rem; width: 100%; }
    .mini-progress { width: 100%; }
}

@media (max-height: 800px) {
    #app { overflow-y: auto; }
    main { padding: 2rem 0; }
}
