/* Membership Card Styles */

.card-section {
    display: none;
    text-align: center;
    padding: 20px;
}

.card-section.active {
    display: block;
}

.loading-text {
    font-size: 20px;
    color: #00ffff;
    margin: 20px 0;
}

.error-text {
    font-size: 18px;
    color: #ff00ff;
    margin: 20px auto;
    max-width: 600px;
    line-height: 1.6;
}

/* Login Prompt Styles */
.prompt-title {
    font-size: 32px;
    color: #ffff00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 20px 0;
}

.prompt-description {
    font-size: 20px;
    color: #00ffff;
    margin: 20px auto;
    max-width: 600px;
    line-height: 1.6;
}

.login-btn {
    text-decoration: none;
    display: inline-block;
}

.login-note {
    font-size: 16px;
    color: #ff00ff;
    margin: 15px auto;
    font-style: italic;
}

/* Membership Card Container */
.card-container {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 4px solid #000080;
    border-radius: 15px;
    /* Standard credit card aspect ratio: 3.375" x 2.125" (1.588:1) */
    width: 540px;
    height: 340px;
    margin: 30px auto;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #000080 0%, #0000cd 100%);
    color: white;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 3px solid #ffff00;
    margin: -1px -1px 0 -1px;
    border-radius: 11px 11px 0 0;
}

.card-logo {
    border-radius: 50%;
    border: 5px solid #ffff00;
    background: white;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.card-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}

.card-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    color: #ffff00;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card-subtitle {
    margin: 2px 0 0 0;
    font-size: 10px;
    color: #00ffff;
    font-weight: bold;
}

.card-member-id {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.member-id-label {
    font-size: 8px;
    color: #00ffff;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.member-id-value {
    font-size: 14px;
    color: #ffff00;
    font-weight: bold;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Card Body */
.card-body {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: white;
    align-items: stretch;
}

.card-left {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-photo {
    flex-shrink: 0;
}

.card-photo img {
    width: 150px;
    height: 150px;
    border: 3px solid #000080;
    border-radius: 8px;
    object-fit: cover;
    background: #000080;
    display: block;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.photo-label {
    font-size: 7px;
    color: #000080;
    margin-top: 3px;
    font-weight: bold;
    text-align: center;
    letter-spacing: 0.5px;
}

.card-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    gap: 0;
}

.info-block {
    display: flex;
    flex-direction: column;
    padding: 7px 0;
    border-bottom: 2px solid #e0e0e0;
}

.info-block:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 10px;
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.info-value {
    font-size: 16px;
    color: #000080;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* Membership Level Colors */
#user-status[data-status="VIP"],
#user-status:contains("VIP") {
    color: #9146FF !important;
    /* Twitch purple */
}

#user-status[data-status="MODERATOR"] {
    color: #00AD03 !important;
    /* Mod green */
}

#user-status[data-status="SUBSCRIBER"] {
    color: #9146FF !important;
    /* Sub purple */
}

#user-status[data-status="BROADCASTER"] {
    color: #E91916 !important;
    /* Broadcaster red */
}

/* Card Footer */
.card-footer {
    background: #f8f8f8;
    padding: 8px 15px;
    border-top: 2px solid #ddd;
}

.barcode {
    margin-bottom: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#barcode-svg {
    width: 100%;
    max-width: 400px;
    height: 30px;
    display: block;
}

.barcode-number {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #000;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.card-disclaimer {
    text-align: center;
    margin-top: -6px;
}

.card-disclaimer p {
    margin: 0;
    font-size: 10px;
    color: #000;
    font-weight: bold;
    line-height: 1.2;
}

/* Print Section */
.print-section {
    margin: 30px auto;
    text-align: center;
}

.action-btn {
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 300% 300%;
    animation: rainbow-animation 3s ease infinite;
    border: 3px solid #ffff00;
    color: #000080;
    font-family: 'Comic Sans MS', cursive, sans-serif;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 40px;
    cursor: pointer;
    border-radius: 10px;
    margin: 20px auto;
    display: inline-block;
    text-transform: uppercase;
    box-shadow: 0 0 20px #00ffff;
    transition: transform 0.2s;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px #ffff00;
}

.action-btn:active {
    transform: scale(0.95);
}

.print-instructions {
    font-size: 16px;
    color: #00ffff;
    margin: 15px auto;
    max-width: 500px;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .stars,
    .sparkle,
    .navbar,
    marquee,
    .construction-gif,
    h1,
    .divider,
    footer,
    .print-section {
        display: none !important;
    }

    /* Hide sparkle divs created by sparkle.js */
    body>div[style*="z-index: 999"] {
        display: none !important;
    }

    .card-container {
        box-shadow: none;
        border: 2px solid #000;
        page-break-inside: avoid;
        /* Exact credit card size: 3.375" x 2.125" */
        width: 3.375in;
        height: 2.125in;
        margin: 0;
        border-radius: 0.15in;
    }

    .card-section {
        padding: 0;
    }

    /* Scale down all elements proportionally for print */
    .card-header {
        padding: 0.02in 0.1in;
        gap: 0.06in;
        border-bottom-width: 2px;
        background: linear-gradient(135deg, #000080 0%, #0000cd 100%) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .card-logo img {
        width: 0.28in;
        height: 0.28in;
    }

    .card-title h2 {
        font-size: 10pt;
    }

    .card-subtitle {
        font-size: 5.5pt;
    }

    .card-member-id {
        margin-left: auto;
    }

    .member-id-label {
        font-size: 4.5pt;
    }

    .member-id-value {
        font-size: 8pt;
    }

    .card-body {
        padding: 0.07in 0.07in 0.05in 0.07in;
        gap: 0.07in;
    }

    .card-photo img {
        width: 0.85in;
        height: 0.85in;
        border-width: 2px;
    }

    .photo-label {
        font-size: 4pt;
        margin-top: 0.01in;
    }

    .info-block {
        padding: 0.03in 0;
        border-bottom-width: 1px;
    }

    .info-label {
        font-size: 5pt;
        margin-bottom: 0.01in;
        letter-spacing: 0.01in;
    }

    .info-value {
        font-size: 8.5pt;
    }

    .card-footer {
        padding: 0.04in 0.1in;
        border-top-width: 1px;
    }

    .barcode {
        margin-bottom: 0.02in;
    }

    #barcode-svg {
        height: 0.18in;
        max-width: 2.5in;
    }

    .barcode-number {
        font-size: 5pt;
        letter-spacing: 0.01in;
    }

    .card-disclaimer p {
        font-size: 4.5pt;
        margin: 0;
        line-height: 1.1;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .card-container {
        max-width: 95%;
        margin: 20px auto;
    }

    .card-body {
        flex-direction: column;
        align-items: center;
    }

    .card-photo img {
        width: 120px;
        height: 120px;
    }

    .card-info {
        width: 100%;
    }

    .card-title h2 {
        font-size: 22px;
    }

    .action-btn {
        font-size: 20px;
        padding: 12px 30px;
    }
}