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

body {
    font-family: 'Circular Std', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #191414;
    line-height: 1.5;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e9e9e9;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #191414;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.menu-icon:hover {
    background-color: #f0f0f0;
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 700;
    font-size: 24px;
}

.logo svg {
    color: #1db954;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: #b3b3b3;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: white;
}

/* Main Content */
.main {
    flex: 1;
    background: #fff;
    padding: 40px 0 80px;
}

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

/* Verification Header */
.verification-header {
    margin-bottom: 10px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    color: white;
}

.section-header p {
    font-size: 18px;
    color: #b3b3b3;
    max-width: 600px;
    margin: 0 auto;
}

/* Payment Section */
.payment-section {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid #e9e9e9;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

/* Address Summary Card */
.address-summary {
    background: #fafafa;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-title {
    font-weight: 900;
    color: #191414;
}

.summary-edit {
    background: transparent;
    color: #1db954;
    border: 1px solid #1db954;
    border-radius: 500px;
    padding: 8px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.summary-edit:hover {
    background: #1db954;
    color: #000;
}

.summary-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    color: #535353;
    margin-bottom: 8px;
}

.summary-line { font-size: 14px; }

.summary-note { color: #6a6a6a; font-size: 12px; }

.payment-header {
    text-align: left;
    margin-bottom: 16px;
}

.payment-header h2 {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 6px;
    color: #191414;
}

.payment-header p {
    color: #6a6a6a;
    font-size: 14px;
}

/* Plan summary */
.plan-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 28px;
    border-bottom: 1px solid #e9e9e9;
    margin-bottom: 20px;
}
.plan-left { display: flex; gap: 12px; }
.plan-icon { font-size: 28px; }
.plan-title { color:#191414; font-weight:900; }
.plan-sub { color:#6a6a6a; font-size:12px; margin-top:2px; }
.plan-bullets { margin-top:10px; color:#535353; font-size:14px; }
.plan-bullets li { margin: 6px 0; }
.plan-right { text-align:right; }
.plan-price { color:#191414; font-weight:900; }
.plan-period { color:#6a6a6a; font-size:12px; }

/* Payment method header */
.payment-method-header {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0 8px;
}
.pm-radio { width:14px; height:14px; background:#1db954; border-radius:50%; box-shadow: 0 0 0 4px #dff5e7 inset; }
.pm-title { color:#191414; font-weight:900; }
.pm-logos { display:flex; gap:8px; }
.pm-logo { background:#f4f4f4; color:#6a6a6a; border:1px solid #e1e1e1; border-radius:4px; padding:2px 6px; font-size:10px; }
.pm-lock { color:#6a6a6a; }

/* Payment Failed Banner */
.banner-failed {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(238, 90, 82, 0.3);
}

.failed-head {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.failed-sub {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.failed-sub a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
}

.failed-sub a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.form-section {
    border-bottom: 1px solid #282828;
    padding-bottom: 32px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.formses {
    display: flex;
    gap: 12px;
}

.formses .form-group {
    flex: 1;
    max-width: 200px;
}

.formses .form-group input {
    width: 100%;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #191414;
}

.form-group input,
.form-group select {
    padding: 16px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    color: #191414;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

/* Native select arrow alignment and bold selected text */
select#country {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%236a6a6a" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

select#country option[disabled],
select#country option[value=""] {
    color: #6a6a6a;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1db954;
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
}

.form-group input::placeholder {
    color: #535353;
}

/* Card Input */
.card-input-container {
    position: relative;
}

.card-icons {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
}

.card-icon {
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

/* CVV help */
.cvv-input-wrapper { position: relative; }
.cvv-help { position:absolute; right:10px; top:50%; transform: translateY(-50%); border:none; background:#f4f4f4; color:#6a6a6a; width:28px; height:28px; border-radius:50%; cursor:pointer; }

.card-icon.active {
    opacity: 1;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1db954;
    margin: 0;
}

.checkbox-container label {
    color: #b3b3b3;
    font-size: 14px;
    line-height: 1.4;
}

.checkbox-container a {
    color: #1db954;
    text-decoration: none;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

/* Security Notice */
.security-notice {
    background: #282828;
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.security-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.security-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.security-text p {
    font-size: 14px;
    color: #b3b3b3;
    line-height: 1.5;
}

/* Submit Button */
.submit-button {
    background: #1db954;
    color: white;
    border: none;
    border-radius: 500px;
    padding: 20px 32px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
    width: 100%;
}

.submit-button:hover {
    background: #1ed760;
    transform: scale(1.02);
}

.submit-button:active {
    transform: scale(0.98);
}

.button-text {
    font-size: 18px;
    font-weight: 700;
}

/* Footer */
.footer {
    background: #000;
    border-top: 1px solid #282828;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px;
    justify-content: center;
}

.footer-links a {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
}

.footer-links a:hover {
    color: white;
}

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

.footer-bottom p {
    font-size: 12px;
    color: #535353;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card-icons {
        position: absolute;
        right: -4%;
        margin-left: 100000px;
        top: 50%;
        transform: translateY(-50%);
        display: flex
    ;
        gap: 8px;
    }
    .payment-method-header {
        display: grid
    ;
        grid-template-columns: auto auto auto;
        align-items: center;
        gap: 12px;
        padding: 12px 0 8px;
    }
    .header-content {
        padding: 0 16px;
    }
    
    .nav {
        display: none;
    }
    
    .menu-icon {
        display: block;
        cursor: pointer;
        font-size: 24px;
        color: #b3b3b3;
        transition: color 0.2s ease;
    }
    
    .menu-icon:hover {
        color: #191414;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .main {
        padding: 40px 0;
    }
    
    .billing-container {
        padding: 0 16px;
    }
    
    .section-header h1 {
        font-size: 36px;
    }
    
    .section-header p {
        font-size: 16px;
    }
    
    
    .payment-section {
        padding: 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row.three-col {
        grid-template-columns: 1fr;
    }
    
    .submit-button {
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .footer-links {
        gap: 16px;
        justify-content: flex-start;
    }
}

/* Desktop - show nav, hide menu icon */
@media (min-width: 769px) {
    .nav {
        display: flex;
    }
    
    .menu-icon {
        display: none;

    }

    .card-icons {
        position: absolute;
        right: -4%;
        margin-left: 100000px;
        top: 50%;
        transform: translateY(-50%);
        display: flex
    ;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .card-icons {
        position: absolute;
        right: -4%;
        margin-left: 100000px;
        top: 50%;
        transform: translateY(-50%);
        display: flex
    ;
        gap: 8px;
    }
    .payment-method-header {
        display: grid
    ;
        grid-template-columns: auto auto auto;
        align-items: center;
        gap: 12px;
        padding: 12px 0 8px;
    }
    .section-header h1 {
        font-size: 28px;
    }
    
    .plan-card {
        padding: 20px 16px;
    }
    
    .payment-section {
        padding: 24px 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 14px;
        font-size: 16px;
    }
    
    .submit-button {
        padding: 16px 24px;
        font-size: 16px;
    }
}

/* Loading States */
.submit-button:disabled {
    background: #535353;
    cursor: not-allowed;
    transform: none;
}

.submit-button:disabled:hover {
    transform: none;
}

.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Error States */
.form-group.error input,
.form-group.error select {
    border-color: #e22134;
}

.form-group.error label {
    color: #e22134;
}

.error-message {
    color: #e22134;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Success States */
.form-group.success input,
.form-group.success select {
    border-color: #1db954;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-section {
    animation: fadeInUp 0.5s ease-out;
}

/* 2-Step Process Styles */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: #d3d3d3;
    z-index: 1;
}

.step.active:not(:last-child)::after {
    background: #1db954;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d3d3d3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #1db954;
    transform: scale(1.1);
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #535353;
    text-align: center;
}

.step.active .step-label {
    color: #191414;
    font-weight: 700;
}

.form-step {
    display: none;
    animation: fadeInUp 0.3s ease-out;
}

.form-step.active {
    display: block;
}

.next-button {
    width: 100%;
    height: 52px;
    padding: 0 24px;
    background: #1db954;
    color: white;
    border: none;
    border-radius: 500px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.next-button:hover {
    background: #169c46;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.next-button:active {
    transform: translateY(0);
}

.step-buttons {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    align-items: center;
    justify-content: center;
}

.back-button {
    flex: 1;
    height: 52px;
    padding: 0 24px;
    background: transparent;
    color: #535353;
    border: 2px solid #d3d3d3;
    border-radius: 500px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    min-height: 52px;
    touch-action: manipulation;
}

.back-button:hover {
    border-color: #191414;
    color: #191414;
    transform: scale(1.02);
}

.submit-button {
    flex: 2;
    height: 52px;
    padding: 0 24px;
    background: #1db954;
    color: white;
    border: none;
    border-radius: 500px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    min-height: 52px;
    touch-action: manipulation;
}

.submit-button:hover {
    background: #169c46;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.submit-button:active {
    transform: translateY(0);
}

.button-icon {
    font-size: 18px;
    font-weight: 900;
}

/* Responsive Design for Steps */
@media (max-width: 768px) {
    .step-indicator {
        margin-bottom: 24px;
        padding: 0 10px;
    }
    
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step:not(:last-child)::after {
        top: 16px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .step-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .back-button,
    .submit-button {
        flex: 1;
        width: 100%;
    }
    
    /* Payment form responsive styles */
    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .formses {
        flex-direction: column;
        gap: 12px;
    }
    
    .formses .form-group {
        max-width: 100%;
    }
    
    .form-group {
        width: 100%;
    }
    
    .card-input-container {
        flex-direction: row;
        gap: 12px;
    }
    
    .card-icons {
        justify-content: center;
        gap: 8px;
    }
    
    .card-icon {
        width: 28px;
        height: 18px;
    }
    
    .cvv-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }
    
    .cvv-help {
        align-self: flex-start;
        margin-top: 4px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 12px;
    }
    
    .checkbox-container {
        font-size: 14px;
        line-height: 1.4;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .billing-container {
        padding: 16px;
        margin: 16px;
    }
    
    .form-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 16px;
        padding: 12px;
        border-radius: 8px;
    }
    
    .back-button,
    .submit-button {
        height: 48px;
        font-size: 15px;
        padding: 0 20px;
    }
    
    .card-icons {
        gap: 6px;
    }
    
    .card-icon {
        width: 24px;
        height: 15px;
    }
    
    .cvv-help {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .checkbox-container {
        font-size: 13px;
        padding: 8px 0;
    }
    
    .checkbox-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
}
