:root {
    --bg-color: #0c1222;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --primary-color: #ffffff;
    --primary-text: #000000;
    --primary-hover: #e2e8f0;
    --text-main: #f8fafc;
    --text-muted: #64748b;
    --success: #34d399;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    background-image: 
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-bottom: 90px;
    -webkit-font-smoothing: antialiased;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px;
}

.header {
    margin-bottom: 32px;
    text-align: center;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

/* 3D ZHS AI Logo */
.ai-logo-3d {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px auto;
    perspective: 800px;
}
.ai-coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: flip3d 5s linear infinite;
}
.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(96,165,250,0.1) 0%, rgba(167,139,250,0.3) 100%);
    border: 2px solid rgba(167,139,250,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 0 10px rgba(167,139,250,0.8);
    box-shadow: inset 0 0 15px rgba(167,139,250,0.3), 0 0 20px rgba(96,165,250,0.2);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.coin-face.front {
    transform: rotateY(0deg) translateZ(4px);
}
.coin-face.back {
    transform: rotateY(180deg) translateZ(4px);
}
@keyframes flip3d {
    0% { transform: rotateY(0deg) rotateX(15deg); }
    100% { transform: rotateY(360deg) rotateX(15deg); }
}

/* Social Menu */
.social-links {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.social-btn:active {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(0.96);
}

.social-btn svg {
    color: #60a5fa;
}

/* Premium Glass & Layout */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.products-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-16px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
}

.product-card:active::before {
    opacity: 1;
}

.product-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    margin-bottom: 0;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.product-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.product-duration {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.price-tag {
    margin-top: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.official-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.7;
    display: block;
    margin-bottom: 4px;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

/* Elegancy Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

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

.modal-content {
    width: 100%;
    max-width: 600px;
    padding: 32px 24px;
    border-radius: 32px 32px 0 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: -48px;
    right: 50%;
    transform: translateX(50%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-btn:active {
    background: rgba(255,255,255,0.3);
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

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

.modal-prices {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.03);
}

.modal-prices > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-muted);
}

.modal-prices > div:last-child {
    margin-bottom: 0;
}

.price-val {
    color: var(--primary-color);
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--primary-text);
    border: none;
    padding: 16px;
    width: 100%;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:active {
    background: var(--primary-hover);
    transform: scale(0.97);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-secondary:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.97);
}

.discount-toggle {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    background: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.15);
    padding: 16px;
    border-radius: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: var(--success);
}

input:checked + .slider:before {
    transform: translateX(22px);
}
