:root {
    --gold: #b8860b;
    --gold-light: #daa520;
    --gold-dark: #8b6914;
    --gold-bright: #ffd700;
    --black: #000000;
    --white: #ffffff;
    --gray-light: #f8f8f8;
    --success-green: #28a745;
}

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

body {
    font-family: "Urbanist", sans-serif;
    color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--black);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/bg.webp');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.2;
    z-index: -1;
}

header {
    text-align: center;
    padding: 1.5rem 0;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    position: relative;
    z-index: 1;
}

header .logo {
    width: 140px;
    margin-bottom: 0.5rem;
}

header h1 {
    font-size: 2rem;
    color: var(--gold);
    font-family: "Urbanist", sans-serif;
    font-weight: 300;
}

.main-content {
    flex: 1;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 200px);
}

.hero {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    color: white;
    font-family: "Urbanist", sans-serif;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: white;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.verification-section {
    max-width: 400px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.verification-card h3 {
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.serial-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reduced gap */
    margin: 0 auto 1.5rem;
    padding: 1rem;
    border: 1px solid var(--gold);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.5);
    max-width: 99%; /* Ensure container doesn't overflow */
}

.serial-prefix {
    background: var(--gold);
    color: var(--white);
    padding: 0.8rem; /* Reduced padding */
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.2rem;
    width: 40px; /* Slightly smaller */
    height: 40px; /* Slightly smaller */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.serial-digits {
    display: flex;
    gap: 3px; /* Reduced gap */
    flex-wrap: nowrap; /* Prevent wrapping */
}

.digit-input {
    width: 40px; /* Slightly smaller */
    height: 40px; /* Slightly smaller */
    text-align: center;
    font-size: 1.2rem;
    border: 1px solid var(--gold);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    color: var(--gold-light);
    padding: 0;
}

.digit-input:focus {
    outline: none;
    border-color: var(--gold-bright);
    background-color: rgba(0, 0, 0, 0.5);
}

.digit-input.valid {
    border-color: var(--success-green);
}

.digit-input.invalid {
    border-color: #ff4444;
}

.verify-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    color: var(--white);
    background: var(--gold);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.verify-button:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.verify-button.verified {
    background: var(--success-green);
    cursor: default;
}

.verification-details {
    display: none;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.85);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--gold-dark);
    text-align: left;
    color: var(--white);
    backdrop-filter: blur(10px);
}

.verification-content {
    display: block;
}

@media (min-width: 1024px) {
    .verification-details {
        max-width: 1000px;
        margin: 2rem auto;
    }
    
    .verification-content {
        display: flex;
        gap: 2rem;
        align-items: flex-start;
    }

    .bar-image {
        flex: 1;
        margin-top: 0 !important;
    }

    .verification-result {
        flex: 1;
    }
}

.bar-image {
    margin-top: 2rem;
    text-align: center;
}

.bar-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--gold);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.7);
}

.verification-result {
    padding: 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
}

.verification-status {
    margin-bottom: 2rem;
    text-align: center;
}

.verification-status h3 {
    margin-bottom: 1rem;
}

.verification-status .tick {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    color: var(--white);
    background: var(--success-green);
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
}

.status-badge {
    background: var(--success-green);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
}

.detail-row:last-child {
    border-bottom: none;
}

.label {
    color: var(--gold);
    font-weight: bold;
}

.value {
    color: var(--gold-bright);
}

.check-another-button, .try-again-button {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 2rem auto 0;
    padding: 1rem;
    font-size: 1rem;
    font-weight: bold;
    color: var(--white);
    background: var(--gold);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.check-another-button:hover, .try-again-button:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.footer {
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-light);
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.footer a {
    color: var(--gold);
    text-decoration: none;
}

.footer a:hover {
    color: var(--gold-light);
}

.verification-invalid {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: var(--white);
    text-align: center;
    border: 1px solid #ff4444;
    backdrop-filter: blur(10px);
}

.invalid-message {
    color: var(--white);
    font-weight: bold;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.contact-message {
    color: var(--gold-light);
    margin-top: 1rem;
    line-height: 1.5;
}

.verify-date {
    margin-top: 1rem;
    color: var(--gray-light);
    font-size: 0.9rem;
    text-align: right;
}

@media (max-width: 400px) {
    .serial-input-container {
        gap: 4px;
        padding: 0.8rem;
    }

    .digit-input {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .serial-prefix {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}