:root {
    --primary: #0F52BA; /* Sapphire Blue */
    --primary-light: #2A6DCB;
    --primary-dark: #0A3A8A;
    --secondary: #10B981; /* Emerald */
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-main: #F3F4F6;
    --bg-card: #FFFFFF;
    --border: #E5E7EB;
    --error: #EF4444;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
    --shadow-lg: 0 20px 40px -5px rgba(15, 82, 186, 0.15);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Status Banner */
.status-banner {
    background: #FEF3C7;
    color: #92400E;
    text-align: center;
    padding: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.status-banner.ended {
    background: #FEE2E2;
    color: #991B1B;
}

/* Layout */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 992px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
        min-height: 100vh;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    overflow: hidden;
    min-height: 400px;
}

@media (min-width: 992px) {
    .hero-section {
        padding: 4rem 5rem;
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 82, 186, 0.9) 0%, rgba(10, 58, 138, 0.7) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 500px;
}

.brand-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
}

.hero-website-link {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    z-index: 3;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-website-link:hover {
    color: white;
}

@media (min-width: 992px) {
    .hero-website-link {
        left: 5rem;
        bottom: 2.5rem;
    }
}

/* Form Section */
.form-section {
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--bg-main);
}

@media (min-width: 992px) {
    .form-section {
        padding: 4rem;
    }
}

.form-container {
    width: 100%;
    max-width: 550px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
    position: relative;
}

@media (min-width: 768px) {
    .form-container {
        padding: 3.5rem;
    }
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.form-header h2 {
    color: var(--text-main);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-error {
    background-color: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FCA5A5;
}

/* Form Elements */
.form-row {
    margin-bottom: 1.5rem;
}

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

@media (min-width: 576px) {
    .form-row.split {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-main);
    background-color: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

input::placeholder {
    color: #9CA3AF;
}

input:focus,
select:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 82, 186, 0.1);
}

/* Select Styling */
.select-wrapper {
    position: relative;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    position: relative;
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    background-color: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-right: 0.75rem;
    margin-top: 0.1rem;
    transition: all 0.2s ease;
}

.checkbox-label:hover .checkbox-custom {
    border-color: var(--primary);
}

.checkbox-label input:checked ~ .checkbox-custom {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
}

.checkbox-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(15, 82, 186, 0.2), 0 2px 4px -1px rgba(15, 82, 186, 0.1);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(15, 82, 186, 0.3), 0 4px 6px -2px rgba(15, 82, 186, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

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

/* Loading Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    z-index: 2;
    width: 24px;
    height: 24px;
}
  
.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}
  
@keyframes rotate {
    100% { transform: rotate(360deg); }
}
  
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* State Views */
.text-center {
    text-align: center;
}

.success-icon, .duplicate-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.success-icon {
    background-color: #ECFDF5;
    color: var(--secondary);
}

.duplicate-icon {
    background-color: #F3F4F6;
    color: var(--text-muted);
}

.success-icon svg, .duplicate-icon svg {
    width: 32px;
    height: 32px;
}

#view-success h2, #view-duplicate h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.success-message {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* Share Panel */
.share-panel {
    background: #F9FAFB;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: left;
}

.share-panel-header {
    margin-bottom: 1rem;
    text-align: center;
}

.share-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.share-panel-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.share-link-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.share-link-group input {
    background: white;
}

.btn-secondary {
    background: var(--text-main);
    color: white;
    width: auto;
    padding: 0 1.25rem;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #111827;
}

.social-share {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-btn.fb { background: #1877F2; }
.share-btn.tw { background: #000000; }

/* Powered By */
#wbx-powered-by-slot {
    margin: 2rem auto;
    width: 100%;
    max-width: 1400px;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}
