* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #66eaea 0%, #08634f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 900px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ── LEFT ── */
.left {
    background: linear-gradient(135deg, #005f66 0%, #00443e 100%);
    padding: 60px 40px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.left .icon { font-size: 52px; margin-bottom: 24px; opacity: 0.9; }
.left h1 { font-size: 32px; margin-bottom: 16px; }
.left p  { font-size: 15px; line-height: 1.7; opacity: 0.85; margin-bottom: 28px; }
.left ul { list-style: none; }
.left ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
    opacity: 0.9;
}
.left ul li i { font-size: 18px; }
/* ── RIGHT ── */
.right { padding: 50px 40px; overflow-y: auto; max-height: 90vh; }
.right-header { text-align: center; margin-bottom: 32px; }
.right-header h2 { font-size: 26px; color: #333; margin-bottom: 8px; }
.right-header p  { color: #666; font-size: 14px; }
/* steps */
.steps {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step { width: 30px; height: 4px; background: #e8ecf1; border-radius: 2px; transition: 0.4s; }
.step.active { background: #27a594; width: 50px; }
/* views */
.view { display: none; animation: fadeIn 0.3s ease-out; }
.view.active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* plan cards */
.plan-card {
    border: 2px solid #e8ecf1;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.2s;
}
.plan-card:hover { border-color: #27a594; }
.plan-card.selected { border-color: #27a594; background: #f0fdfb; }
.plan-icon {
    width: 48px; height: 48px;
    background: #f5f7fa;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: #888;
    flex-shrink: 0;
    transition: 0.2s;
}
.plan-card.selected .plan-icon { background: #27a594; color: white; }
.plan-info { flex: 1; }
.plan-info b { display: block; font-size: 15px; color: #333; margin-bottom: 3px; }
.plan-info span { font-size: 12px; color: #888; }
.plan-price { font-weight: 700; color: #27a594; font-size: 15px; white-space: nowrap; }
/* summary */
.summary-box {
    background: #f5f7fa;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}
.summary-box .label { font-size: 13px; color: #888; margin-bottom: 6px; }
.summary-box .amount { font-size: 2rem; font-weight: 800; color: #333; }
/* payment methods */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.method {
    border: 2px solid #e8ecf1;
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    transition: 0.2s;
}
.method.active { border-color: #27a594; color: #27a594; background: #f0fdfb; }
/* form */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 7px;
    text-transform: uppercase;
}
.form-group input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-size: 15px;
    background: #f5f7fa;
    transition: 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: #27a594;
    background: white;
    box-shadow: 0 0 0 4px rgba(39,165,148,0.1);
}
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
/* buttons */
.btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-primary {
    background: linear-gradient(135deg, #27a594 0%, #02502c 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(39,165,148,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(39,165,148,0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
    background: none;
    color: #888;
    margin-top: 10px;
    font-size: 14px;
}
.btn-ghost:hover { color: #333; }
/* success */
.success-screen { text-align: center; padding: 20px 0; }
.success-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #27a594, #02502c);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(39,165,148,0.35);
}
.success-screen h2 { font-size: 24px; color: #333; margin-bottom: 10px; }
.success-screen p  { color: #888; font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
.back-home { text-align: center; margin-top: 20px; }
.back-home a {
    color: #27a594;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.back-home a:hover { text-decoration: underline; }
/* ── Post Picker ── */
.post-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    align-items: flex-end;
    justify-content: center;
}
.post-picker-overlay.open { display: flex; }
.post-picker {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}
.post-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e8ecf1;
}
.post-picker-header h3 { font-size: 16px; color: #333; }
.post-picker-header button {
    background: none;
    border: none;
    font-size: 18px;
    color: #888;
    cursor: pointer;
}
.post-picker-list {
    overflow-y: auto;
    padding: 12px 16px 24px;
    flex: 1;
}
.post-picker-loading { text-align: center; padding: 30px; color: #888; font-size: 14px; }
.post-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.post-item:hover { border-color: #27a594; background: #f0fdfb; }
.post-item.picked { border-color: #27a594; background: #f0fdfb; }
.post-item img {
    width: 56px; height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.post-item-info { flex: 1; min-width: 0; }
.post-item-info b { display: block; font-size: 14px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-item-info span { font-size: 12px; color: #888; }
.post-item-check { color: #27a594; font-size: 18px; display: none; }
.post-item.picked .post-item-check { display: block; }
@media (max-width: 768px) {
    .container { grid-template-columns: 1fr; }
    .left { padding: 40px 30px; }
    .right { padding: 36px 28px; }
    .left h1 { font-size: 26px; }
}
/* ── Font Awesome animation fixes for older Safari / iPhone 6s ── */

/* fa-spin */
.fa-spin {
    -webkit-animation: fa-spin 2s infinite linear;
    animation: fa-spin 2s infinite linear;
}

@-webkit-keyframes fa-spin {
    0%   { -webkit-transform: rotate(0deg);   transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes fa-spin {
    0%   { -webkit-transform: rotate(0deg);   transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* fa-bounce */
.fa-bounce {
    -webkit-animation: fa-bounce 1s infinite;
    animation: fa-bounce 1s infinite;
}

@-webkit-keyframes fa-bounce {
    0%, 100% { -webkit-transform: translateY(0);    transform: translateY(0); }
    50%       { -webkit-transform: translateY(-6px); transform: translateY(-6px); }
}

@keyframes fa-bounce {
    0%, 100% { -webkit-transform: translateY(0);    transform: translateY(0); }
    50%       { -webkit-transform: translateY(-6px); transform: translateY(-6px); }
}

/* fa-pulse (used in loading spinners) */
.fa-pulse {
    -webkit-animation: fa-spin 1s infinite steps(8);
    animation: fa-spin 1s infinite steps(8);
}

/* Ensure animation runs on all webkit browsers */
.fa-spin,
.fa-bounce,
.fa-pulse {
    -webkit-animation-play-state: running;
    animation-play-state: running;
}
/* Manual spin animation for iOS/Safari */
@-webkit-keyframes spin-rotate {
    0%   { -webkit-transform: rotate(0deg)   translateZ(0); transform: rotate(0deg)   translateZ(0); }
    100% { -webkit-transform: rotate(360deg) translateZ(0); transform: rotate(360deg) translateZ(0); }
}
@keyframes spin-rotate {
    0%   { -webkit-transform: rotate(0deg)   translateZ(0); transform: rotate(0deg)   translateZ(0); }
    100% { -webkit-transform: rotate(360deg) translateZ(0); transform: rotate(360deg) translateZ(0); }
}
.spin-icon {
    display: inline-block;
    -webkit-animation: spin-rotate 1s linear infinite;
    animation: spin-rotate 1s linear infinite;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}