/* Lelouch Shop - Main Styles */
:root {
    --bg-void: #0A0414;
    --bg-depth: #0F0820;
    --bg-layer: #1A0F2E;
    --bg-surface: #25153F;
    --bg-elevated: #311B52;
    
    --accent-primary: #8B5CF6;
    --accent-glow: #A78BFA;
    --accent-bright: #C4B5FD;
    
    --gold: #F59E0B;
    --gold-glow: #FBBF24;
    
    --text-primary: #FEFEFE;
    --text-secondary: #C4B5FD;
    --text-muted: #9E95B7;
    
    --border: rgba(139, 92, 246, 0.15);
    --border-bright: rgba(139, 92, 246, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3)); }
    50% { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.6)); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', Roboto, sans-serif;
    background: #000000;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-bottom: 80px;
}

body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, rgba(109, 40, 217, 0.15) 30%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    position: relative;
    z-index: 1;
}

.hero {
    background: linear-gradient(135deg, var(--bg-depth) 0%, var(--bg-layer) 100%);
    border-radius: 24px;
    padding: clamp(2rem, 6vw, 3rem) clamp(1.5rem, 4vw, 2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: shimmer 3s infinite;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-bright);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: clamp(0.75rem, 2.5vw, 0.875rem);
    font-weight: 600;
    color: var(--accent-bright);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.profile-card {
    background: linear-gradient(135deg, var(--bg-layer) 0%, var(--bg-surface) 100%);
    border-radius: 20px;
    padding: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out 0.1s both;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0.5;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #6D28D9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.avatar::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-glow), var(--gold-glow));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: glow 3s ease-in-out infinite;
}

.profile-info h2 {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.profile-info .username {
    color: var(--text-secondary);
    font-size: clamp(0.9375rem, 3.5vw, 1.0625rem);
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: var(--bg-elevated);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--gold));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-bright) 0%, var(--gold-glow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-left: 0.5rem;
    position: relative;
    letter-spacing: -0.02em;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent-primary), var(--gold));
    border-radius: 999px;
}

.catalog-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.product-card {
    background: rgba(26, 15, 46, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: clamp(1.5rem, 5vw, 2rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.2s; }
.product-card:nth-child(2) { animation-delay: 0.3s; }
.product-card:nth-child(3) { animation-delay: 0.4s; }
.product-card:nth-child(4) { animation-delay: 0.5s; }

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.product-card:hover::before {
    opacity: 1;
}

.product-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
    position: relative;
    z-index: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.product-title {
    font-size: clamp(1.125rem, 4vw, 1.375rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.product-price {
    font-size: clamp(1.375rem, 5vw, 1.75rem);
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.product-desc {
    color: #a1a1aa;
    font-size: clamp(0.9375rem, 3.5vw, 1rem);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.btn {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 50%, #6D28D9 100%);
    color: var(--text-primary);
    border: none;
    padding: clamp(0.875rem, 3vw, 1.125rem) clamp(1.75rem, 5vw, 2.5rem);
    border-radius: 999px;
    font-size: clamp(1rem, 3.5vw, 1.125rem);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35), 0 0 40px rgba(139, 92, 246, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6), 0 0 60px rgba(139, 92, 246, 0.3);
    filter: brightness(1.1);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: clamp(0.875rem, 3vw, 1.125rem);
    border-radius: 999px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.btn-icon:hover {
    border-color: var(--border-bright);
    transform: scale(1.1);
}

.btn-icon.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-color: var(--accent-bright);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-glow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.badge.pro {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #6D28D9 100%);
    border-color: var(--accent-bright);
    color: var(--text-primary);
}

.empty-state {
    text-align: center;
    padding: clamp(3rem, 8vw, 4rem);
    color: var(--text-muted);
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1px dashed var(--border);
}

.empty-state-icon {
    font-size: clamp(3rem, 8vw, 4rem);
    margin-bottom: 1rem;
    opacity: 0.6;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 8, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0.5rem 0;
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bottom-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    min-width: 70px;
    flex-shrink: 0;
}

.nav-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.nav-label {
    font-size: 0.625rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.nav-item.active {
    background: rgba(139, 92, 246, 0.15);
}

.nav-item.active .nav-label {
    color: var(--accent-bright);
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.nav-item:hover:not(.active) {
    background: rgba(139, 92, 246, 0.08);
}

/* Orders Screen */
.orders-list {
    display: grid;
    gap: 1rem;
}

.order-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: var(--border-bright);
    transform: translateX(4px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-number {
    font-weight: 700;
    color: var(--accent-bright);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: rgba(251, 191, 36, 0.2); color: var(--gold-glow); }
.status-processing { background: rgba(139, 92, 246, 0.2); color: var(--accent-bright); }
.status-completed { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-cancelled { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.order-product {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.order-price {
    font-weight: 700;
    color: var(--text-primary);
}

/* Reviews Screen */
.reviews-list {
    display: grid;
    gap: 1rem;
}

.review-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.review-card:hover {
    border-color: var(--border-bright);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #6D28D9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.review-user {
    font-weight: 600;
}

.review-rating {
    font-size: 0.875rem;
}

.review-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.review-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Top Screen */
.top-list {
    display: grid;
    gap: 1rem;
}

.top-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.top-card:hover {
    border-color: var(--border-bright);
    transform: translateX(4px);
}

.top-card.me {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(109, 40, 217, 0.1));
    border-color: var(--accent-primary);
}

.top-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), #6D28D9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.top-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.top-info {
    flex: 1;
}

.top-name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.top-stats {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Cabinet Screen */
.daily-bonus-card, .referral-card, .wheel-card {
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.daily-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.daily-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));
}

.daily-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.daily-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.daily-progress {
    margin-top: 1.25rem;
}

.daily-days {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.daily-day {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.daily-day.completed {
    background: linear-gradient(135deg, var(--accent-primary), #6D28D9);
    border-color: var(--accent-bright);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.referral-code {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.code-box {
    background: var(--bg-elevated);
    border: 2px solid var(--accent-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-box:hover {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.referral-stat {
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.referral-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-bright), var(--gold-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.referral-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.referral-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Wheel Screen */
.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 2rem auto;
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-layer), var(--bg-surface));
    border: 4px solid var(--accent-primary);
    display: grid;
    place-items: center;
    position: relative;
    transition: transform 3s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.wheel-logo {
    font-size: 5rem;
    filter: drop-shadow(0 8px 18px rgba(245, 158, 11, 0.45));
}

.wheel-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--gold-glow);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--gold);
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.6));
}

.wheel-info {
    text-align: center;
    color: var(--text-muted);
    margin-top: 1rem;
}

.prize-grid,
.referral-rules {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin: 0 0 1.25rem;
}

.prize-grid span,
.referral-rules span {
    padding: 0.75rem;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-align: center;
}

.referral-rules span:last-child {
    grid-column: 1 / -1;
}

.app-version {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.75;
}
