/* Reset & Variables */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #d4af37; /* Rich Gold */
    --primary-hover: #fce477;
    --bg-dark: #200936; /* Deep Purple */
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.8);
    --border-light: rgba(212, 175, 55, 0.3); /* Gold-tinted border */
    --card-bg: rgba(32, 9, 54, 0.6); /* Purple tint */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --radius: 16px;
    --transition: all 0.3s ease;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Background Layers */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transform: scale(1.05); /* Slight scale to prevent edge bleed */
}

.page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(32, 9, 54, 0.9) 0%, rgba(77, 20, 115, 0.75) 100%);
    z-index: -1;
}

/* Layout */
.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    padding: 2rem 1.5rem;
}

.main-content {
    margin: auto auto; /* Vertically and horizontally centers the main block */
    width: 100%;
    max-width: 560px;
}

#wbx-powered-by-slot {
    width: 100%;
    max-width: 560px;
    margin: 2rem auto 0;
}

/* Glassmorphism Card */
.glass-card, .status-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Typography & Headers */
.card-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--primary);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f3cf5a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
}

/* Form Styles */
.entry-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

input[type="text"],
input[type="email"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* Buttons */
.btn-primary {
    position: relative;
    width: 100%;
    padding: 1rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #d4af37 0%, #b89326 100%);
    color: #200936;
    border: none;
    border-radius: 10px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #f3cf5a 0%, #d4af37 100%);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Error & Messages */
.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.875rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
}

/* Success State */
.success-state {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

/* Share Panel */
.share-panel {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.share-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.share-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.share-input-group {
    display: flex;
    gap: 0.5rem;
}

.share-input-group input {
    flex: 1;
    cursor: text;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-success {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #a7f3d0;
}

/* Status Cards */
.status-card {
    text-align: center;
}
.status-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}
.status-card p {
    color: var(--text-muted);
}

/* Spinner */
.spinner-icon {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.spinner-track {
    stroke: rgba(32, 9, 54, 0.2);
}

.spinner-head {
    stroke: #200936;
    stroke-linecap: round;
    stroke-dasharray: 45 60;
}

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

/* Responsive */
@media (max-width: 640px) {
    .glass-card {
        padding: 2rem 1.5rem;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .title {
        font-size: 2rem;
    }
}