:root {
    --nitori-green: #009999;
    --nitori-glow: #00e5e5;
    --bg-dark: #0a0c10;
    --card-bg: rgba(20, 25, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --error-red: #ff3333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image:
        radial-gradient(circle at 50% -20%, rgba(0, 153, 153, 0.15), transparent 70%),
        radial-gradient(circle at 0% 100%, rgba(0, 153, 153, 0.05), transparent 40%);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
}

.logo-nitori {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
    color: var(--nitori-green);
    text-shadow: 0 0 15px rgba(0, 153, 153, 0.5);
}

.logo-tag {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.4rem;
    color: var(--text-secondary);
    margin-top: -2px;
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    letter-spacing: 0.1rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Search Section */
.search-section {
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-wrapper label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--nitori-green);
    letter-spacing: 0.1rem;
}

#vpn-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 153, 153, 0.3);
    border-radius: 12px;
    padding: 1.2rem;
    font-size: 2.5rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--text-primary);
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

#vpn-input:focus {
    border-color: var(--nitori-green);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 153, 153, 0.2), inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Placeholder color */
#vpn-input::placeholder {
    color: rgba(255, 255, 255, 0.1);
}

/* Chrome, Safari, Edge, Opera: hide arrows */
#vpn-input::-webkit-outer-spin-button,
#vpn-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox: hide arrows */
#vpn-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Search Button */
.search-btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, rgba(0, 153, 153, 0.2), rgba(0, 229, 229, 0.2));
    border: 1px solid var(--nitori-green);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 229, 229, 0.1);
    transition: all 0.2s ease;
    outline: none;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.search-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 229, 229, 0.3);
}

/* Result Card */
.result-container {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--nitori-green);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--nitori-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--nitori-glow);
    animation: pulse 2s infinite;
}

.status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.65rem;
    color: var(--nitori-green);
    letter-spacing: 0.1rem;
}

.store-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.store-code-display {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
}

#display-code {
    font-family: 'Orbitron', sans-serif;
    color: var(--nitori-green);
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#store-link {
    display: inline-block;
    color: var(--nitori-green);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05rem;
    transition: opacity 0.2s;
}

#store-link:active {
    opacity: 0.6;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 2rem;
}

.scanner-line {
    width: 100%;
    height: 2px;
    background: var(--nitori-green);
    box-shadow: 0 0 15px var(--nitori-glow);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.scanner-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--nitori-glow), transparent);
    animation: scan 1.5s infinite;
}

.loading p {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--nitori-green);
    letter-spacing: 0.2rem;
}

/* Error Message */
.error-message {
    text-align: center;
    background: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.3);
    padding: 1.2rem;
    border-radius: 12px;
    color: var(--error-red);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
}

.hidden {
    display: none;
    opacity: 0;
    transform: translateY(10px);
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: splashAppear 1.2s ease-out;
}

.splash-icon {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(0, 153, 153, 0.4);
    animation: iconPulse 2s infinite alternate ease-in-out;
}

.splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes splashAppear {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 153, 153, 0.3);
    }

    100% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(0, 153, 153, 0.6);
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

footer {
    text-align: center;
    padding: 1rem;
    animation: fadeIn 1s both;
}

footer p {
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.15rem;
    font-family: 'Orbitron', sans-serif;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Mobile Optimizations */
@media (max-height: 600px) {
    .container {
        padding: 1rem;
        gap: 1rem;
    }

    .logo-nitori {
        font-size: 1.4rem;
    }

    #vpn-input {
        font-size: 2rem;
        padding: 1rem;
    }
}