/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: #dbeafe;
    --accent-color: #0ea5e9;
    --success-color: #059669;
    --success-light: #d1fae5;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --bg-white: #ffffff;
    --bg-surface: #f8fafc;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-white);
    min-height: 100vh;
    padding: 0;
    color: var(--text-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 48px 20px 36px;
    border-bottom: 1px solid var(--border-color);
}

.header h1 {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.header .subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 50px;
}

/* Plan Card */
.plan-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.plan-card.popular {
    border: 2px solid var(--success-color);
    transform: scale(1.03);
}

.plan-card.popular:hover {
    transform: scale(1.03) translateY(-4px);
}

.badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: var(--success-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
}

.plan-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.plan-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 600;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price .amount {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price .period {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Plan Features */
.plan-features {
    margin-bottom: 25px;
}

.plan-features ul {
    list-style: none;
}

.plan-features li {
    padding: 11px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Buy Button */
.btn-buy {
    width: 100%;
    padding: 14px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
    letter-spacing: 0.2px;
}

.btn-buy:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
}

.btn-buy:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(29, 78, 216, 0.2);
}

/* Info Section */
.info-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
}

.info-section h3 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 36px;
    color: var(--text-dark);
    font-weight: 600;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 48px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}

.step p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px 30px;
    text-align: center;
}

.footer p {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

.footer .terms {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.footer .ad-offer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .header .subtitle {
        font-size: 1rem;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plan-card.popular {
        transform: scale(1);
    }

    .plan-card.popular:hover {
        transform: translateY(-4px);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .info-section {
        padding: 25px;
    }

    .price .amount {
        font-size: 2.25rem;
    }
}

/* Rotating Ad Banner */
.ad-banner-wrap {
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.ad-slide {
    display: flex;
    align-items: stretch;
    text-decoration: none;
    color: var(--text-dark);
    min-height: 90px;
}

.ad-accent {
    width: 5px;
    flex-shrink: 0;
}

.ad-logo {
    width: 190px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.ad-logo-img {
    max-width: 150px;
    max-height: 66px;
    object-fit: contain;
}

.ad-logo-papes {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ebf7fc;
}

.ad-logo-papes-inner {
    display: flex;
    flex-direction: column;
}

.ad-logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.15;
    color: #1a5f7a;
    font-family: Georgia, serif;
}

.ad-logo-sub {
    font-size: 0.6rem;
    letter-spacing: 2px;
    color: #5b9ab5;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 3px;
}

.ad-logo-sea {
    font-size: 1.8rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.12));
}

.ad-info {
    padding: 14px 60px 14px 20px;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-info-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.ad-info-tag {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-left: 6px;
}

.ad-info-rows {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.ad-info-rows span {
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
}

.ad-info-rows a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.ad-info-rows a:hover {
    color: var(--primary-color);
}

.ad-dots {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ad-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: var(--border-color);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
}

.ad-dot.active {
    background: var(--primary-color);
}

@media (max-width: 600px) {
    .ad-logo { width: 110px; padding: 10px 12px; }
    .ad-logo-img { max-width: 88px; max-height: 56px; }
    .ad-logo-text { font-size: 1rem; }
    .ad-info { padding: 10px 40px 10px 14px; }
    .ad-info-name { font-size: 0.85rem; }
    .ad-info-rows { flex-direction: column; gap: 3px; }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    width: 100%;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 16px;
    box-sizing: border-box;
}

.lang-btn {
    text-decoration: none;
    font-size: 1.45rem;
    line-height: 1;
    opacity: 0.38;
    transition: opacity 0.18s, transform 0.18s;
    display: inline-block;
}

.lang-btn:hover {
    opacity: 0.75;
    transform: scale(1.15);
}

.lang-btn.active {
    opacity: 1;
    transform: scale(1.12);
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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