:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --accent: #3b82f6;
    --background: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bump-bg: #fff5f5;
    --bump-border: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    padding: 20px 0;
}

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

/* Country Selector */
.country-selector {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.country-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.country-box img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

/* Card Style */
.checkout-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

/* Header */
.product-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.product-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f5f9;
}

.product-info h1 {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.product-info .price {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
}

/* Sections */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #475569;
}

.form-group label span {
    color: #ef4444;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.phone-input-container {
    display: flex;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.phone-input-container:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.phone-prefix {
    background: #f1f5f9;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    border-right: 1.5px solid var(--border);
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-input-container input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
}

/* Order Bump */
.order-bump {
    margin: 32px 0;
    border: 2px dashed var(--bump-border);
    border-radius: 12px;
    background: var(--bump-bg);
    padding: 20px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.order-bump:hover {
    background: #fff1f1;
    transform: translateY(-2px);
}

.bump-checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

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

.bump-checkbox-container span {
    font-weight: 800;
    font-size: 15px;
    color: var(--bump-border);
    text-transform: uppercase;
}

.bump-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.bump-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: white;
    border: 1px solid #fee2e2;
}

.bump-text h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.bump-text p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.bump-price {
    font-weight: 800;
    color: var(--text-main);
    font-size: 14px;
}

/* Summary */
.summary-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}

.summary-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 0;
}

/* Button */
.buy-button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.4);
}

.buy-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.4);
}

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

/* Badges */
.trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Footer */
.checkout-footer {
    text-align: center;
    margin-top: 40px;
    padding-bottom: 40px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.footer-discreet {
    font-weight: 600;
    color: #475569;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

@keyframes pulse-total {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); color: var(--primary); }
    100% { transform: scale(1); }
}

.modal-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
    animation: slide-down 0.5s ease-out;
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#modal-total {
    display: inline-block;
    animation: pulse-total 2s infinite ease-in-out;
}

.modal-card p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.countdown-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
}

.countdown-svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
}

.countdown-circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 8;
}

.countdown-circle-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 2 * PI * 45 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
}

.countdown-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 32px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-payment {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-payment:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

.btn-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.buy-button {
    animation: pulse 2s infinite ease-in-out;
}

/* Errors */
.error-msg {
    color: #ef4444;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
