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

:root {
    --primary-color: #00a8ff;
    --primary-dark: #0077b6;
    --cyan-color: #00e5ff;
    --cyan-dark: #00acc1;
    --accent-color: #7209b7;

    /* Semantic Colors */
    --text-color: #f8f9fa;
    --text-muted: #adb5bd;
    --text-light: #dee2e6;

    /* Backgrounds */
    --bg-color: #0b1120;
    --bg-dark: #050914;
    --bg-card: rgba(255, 255, 255, 0.03);

    /* UI Elements */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-radius: 0.75rem;
    --border-radius-lg: 1.5rem;

    /* Branding */
    --brand-purple: #7209b7;
    --brand-purple-light: #b5179e;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --glow-primary: 0 0 20px rgba(0, 168, 255, 0.15);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 15% 50%, rgba(0, 168, 255, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(114, 9, 183, 0.08), transparent 25%);
    z-index: -10;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background: rgba(5, 9, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-sm) 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 2px solid transparent;
    transition: all var(--transition-base);
}

.step.active {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 168, 255, 0.4);
}

.step.completed {
    background: var(--cyan-color);
    color: #000;
}

.step-line {
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    transition: background var(--transition-base);
}

.step-line.completed {
    background: var(--cyan-color);
}

.step-label {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.checkout-notice {
    font-size: 0.9rem;
    color: #f87171;
    background: rgba(220, 38, 38, 0.1);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(220, 38, 38, 0.2);
    margin-top: var(--spacing-sm);
}

.location-notice {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(34, 197, 94, 0.2);
    margin-top: var(--spacing-sm);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.02);
}

/* Main content */
.main {
    padding-top: 100px;
    padding-bottom: var(--spacing-xl);
    min-height: calc(100vh - 150px);
}

/* Checkout Layout */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--spacing-lg);
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

/* Checkout Card */
.checkout-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.checkout-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.checkout-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-sm);
}

.checkout-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.price-display {
    margin-bottom: var(--spacing-xs);
}

.price-display .price {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-display .period {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.checkout-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
}

/* Form Styles */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

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

.form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.form-input {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.15);
}

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

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Checkbox */
.form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

.terms-link {
    color: var(--cyan-color);
    text-decoration: none;
    transition: color var(--transition-base);
}

.terms-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Optional label */
.optional {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Fieldset Styles */
.form-fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.02);
}

.fieldset-legend {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    padding: 0 0.5rem;
}

.fieldset-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
    line-height: 1.5;
}

.fieldset-note.warning {
    color: #f87171;
    font-weight: 500;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-radio {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.radio-input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.radio-label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1.5;
}

/* Select Dropdown */
.form-select {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23adb5bd' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.15);
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-color);
}

/* Map Container */
.map-container {
    width: 100%;
    margin-bottom: var(--spacing-md);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#map_canvas {
    width: 100%;
    height: 350px;
}

.map-instructions {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.map-instructions p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.map-instructions p:last-child {
    margin-bottom: 0;
}

/* Wide Layout for Review Pages */
.checkout-wrapper-wide {
    grid-template-columns: 1fr;
    max-width: 700px;
}

.checkout-card-wide {
    width: 100%;
}

/* Review Data Display */
.review-section {
    margin-bottom: var(--spacing-md);
}

.review-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.review-value {
    font-size: 1rem;
    color: var(--text-color);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.review-grid {
    display: grid;
    gap: var(--spacing-sm);
}

.review-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.review-divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--spacing-sm) 0;
}

.review-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-sm);
}

.review-data {
    color: var(--text-color);
}

/* Payment Page */
.payment-card {
    text-align: center;
}

.payment-amount {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(0, 168, 255, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 168, 255, 0.2);
}

.payment-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.payment-price {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-checkout {
    width: 100%;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
}

.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: var(--spacing-md);
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(220, 38, 38, 0.2);
    text-align: left;
}

.security-notice i {
    font-size: 1.5rem;
    color: #f87171;
    flex-shrink: 0;
}

.security-notice p {
    font-size: 0.85rem;
    color: #f87171;
    line-height: 1.5;
    font-weight: 500;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    letter-spacing: 0.02em;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #00a8ff 0%, #0077b6 100%);
    color: #fff;
    border: none;
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #33bfff 0%, #0088cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 168, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Features Sidebar */
.features-sidebar {
    background: linear-gradient(145deg, rgba(20, 30, 48, 0.6) 0%, rgba(10, 15, 25, 0.8) 100%);
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    position: sticky;
    top: 100px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.features-sidebar::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(0, 168, 255, 0.3), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-check {
    color: var(--cyan-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Footer */
.footer {
    background: rgba(5, 9, 20, 0.95);
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.privacy-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-sm);
    line-height: 1.6;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 900px) {
    .checkout-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .features-sidebar {
        position: relative;
        top: auto;
        order: -1;
    }
}

@media (max-width: 600px) {
    .main {
        padding-top: 80px;
    }

    .checkout-card {
        padding: var(--spacing-md);
    }

    .checkout-title {
        font-size: 1.5rem;
    }

    .price-display .price {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .features-sidebar {
        padding: var(--spacing-md);
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .review-row {
        grid-template-columns: 1fr;
    }

    #map_canvas {
        height: 280px;
    }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .checkout-card,
    .features-sidebar {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .features-sidebar {
        animation-delay: 0.2s;
    }
}

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