/* IN-NOLA Membership Portal - Modern Celtic Styles */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@700&family=Cormorant+Garamond:wght@400;500;600&display=swap');

:root {
    --gold: #d4a726;
    --gold-light: #f0d78a;
    --gold-glow: rgba(212, 167, 38, 0.4);

    --green-900: #071a0e;
    --green-800: #0d2818;
    --green-700: #143d24;
    --green-600: #1a5231;

    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted: rgba(255, 255, 255, 0.4);

    --success-green: #22c55e;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;

    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: var(--green-900);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Background effects */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--green-700) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(212, 167, 38, 0.08) 0%, transparent 50%);
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url('../../assets/kells/book_of_kells_1.jpg') center/cover no-repeat;
    opacity: 0.06;
    filter: grayscale(40%) brightness(0.7);
    z-index: -1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 440px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
.portal-header {
    text-align: center;
    margin-bottom: 32px;
}

.portal-header h1 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.75rem;
    color: var(--gold);
    margin-bottom: 8px;
}

.portal-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Celtic knot border decoration */
.celtic-border {
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    position: relative;
    background: var(--glass);
    backdrop-filter: blur(12px);
}

.celtic-border::before,
.celtic-border::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.5;
}

.celtic-border::before {
    top: -4px;
    left: 24px;
}

.celtic-border::after {
    bottom: -4px;
    right: 24px;
}

/* Card/Panel */
.card {
    padding: 32px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    background: var(--glass);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(212, 167, 38, 0.4);
    background: var(--glass-hover);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--gold);
    color: var(--green-900);
    width: 100%;
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--gold-glow);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--glass-hover);
    border-color: rgba(212, 167, 38, 0.2);
}

.btn-danger {
    background: var(--error-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Error/Success Messages */
.message {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align: center;
    display: none;
    font-size: 1rem;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.message.show {
    display: block;
}

/* Certificate Styles */
.certificate {
    background: linear-gradient(135deg, #f8f6f0 0%, #f0ebe0 100%);
    color: var(--green-800);
    padding: 32px;
    text-align: center;
    border-radius: var(--radius-lg);
}

.certificate-header {
    border-bottom: 2px solid var(--gold);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.certificate-header h1 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--green-700);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.certificate-header h2 {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 500;
}

.certificate-body {
    margin-bottom: 24px;
}

.certificate-body .label {
    color: rgba(13, 40, 24, 0.6);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.certificate-body .member-name {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.6rem;
    color: var(--green-700);
    font-weight: 700;
    margin-bottom: 16px;
}

.certificate-body .member-type {
    display: inline-block;
    background: var(--green-700);
    color: #f8f6f0;
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.certificate-body .member-type.lifetime {
    background: var(--gold);
    color: var(--green-900);
}

.certificate-dates {
    display: flex;
    justify-content: space-around;
    margin: 24px 0;
    padding: 16px;
    background: rgba(13, 40, 24, 0.06);
    border-radius: var(--radius);
}

.certificate-dates .date-group {
    text-align: center;
}

.certificate-dates .date-label {
    font-size: 0.7rem;
    color: rgba(13, 40, 24, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.certificate-dates .date-value {
    font-size: 1rem;
    color: var(--green-700);
    font-weight: 600;
}

.qr-container {
    margin: 24px 0;
    padding: 20px;
    background: white;
    border-radius: var(--radius);
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.qr-container canvas,
.qr-container img {
    display: block;
}

.qr-label {
    font-size: 0.75rem;
    color: rgba(13, 40, 24, 0.5);
    margin-top: 10px;
}

.certificate-footer {
    border-top: 2px solid var(--gold);
    padding-top: 16px;
    margin-top: 24px;
}

.sign-out-link {
    color: rgba(13, 40, 24, 0.6);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sign-out-link:hover {
    color: var(--error-red);
}

/* Scanner Styles */
.scanner-container {
    padding: 24px;
}

.scanner-header {
    text-align: center;
    margin-bottom: 24px;
}

.scanner-header h1 {
    font-family: 'Cinzel Decorative', serif;
    color: var(--gold);
    font-size: 1.4rem;
}

#reader {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 24px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

#reader video {
    width: 100%;
}

.verification-result {
    padding: 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-top: 24px;
    display: none;
    backdrop-filter: blur(12px);
}

.verification-result.show {
    display: block;
}

.verification-result.valid {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.verification-result.expired {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.verification-result.invalid {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.verification-result .status-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.verification-result.valid .status-icon {
    color: var(--success-green);
}

.verification-result.expired .status-icon {
    color: var(--warning-orange);
}

.verification-result.invalid .status-icon {
    color: var(--error-red);
}

.verification-result .status-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.verification-result .member-info {
    text-align: left;
    background: var(--glass);
    padding: 16px;
    border-radius: var(--radius);
}

.verification-result .member-info p {
    margin-bottom: 8px;
    font-size: 1rem;
}

.verification-result .member-info strong {
    color: var(--gold);
}

/* PIN Entry */
.pin-entry {
    text-align: center;
}

.pin-entry input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 8px;
    max-width: 200px;
}

/* Scan Again Button */
.scan-again-btn {
    margin-top: 20px;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 24px;
}

.loading.show {
    display: block;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }

    .card {
        padding: 24px;
    }

    .portal-header h1 {
        font-size: 1.5rem;
    }

    .certificate-body .member-name {
        font-size: 1.3rem;
    }

    .certificate-dates {
        flex-direction: column;
        gap: 12px;
    }
}
