/* ============================================
   SecureCall - Professional Video Call App
   Mobile-First Design
   ============================================ */

/* CSS Variables */
:root {
    --primary: #00d4ff;
    --secondary: #7b2cbf;
    --accent: #ff006e;
    --success: #00ff88;
    --warning: #ffb700;
    --danger: #ff3860;
    --dark: #0a0a0f;
    --darker: #050508;
    --card-bg: rgba(20, 20, 35, 0.7);
    --glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* App Container */
.app-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px;
    overflow: hidden;
}

/* Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: 10%;
    left: -80px;
    animation-delay: -7s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    top: 40%;
    right: -60px;
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 30px) scale(1.05); }
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 1;
    padding: 24px 0 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Logo Section */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
}

.logo-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 3px;
    animation: pulse-glow 2s infinite;
}

.logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--darker);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 50px;
    height: 50px;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 0 40px rgba(0, 212, 255, 0.7); }
}

.app-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Features Badge */
.features-badge {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 11px;
    color: var(--text-secondary);
}

.badge-icon {
    width: 12px;
    height: 12px;
    color: var(--success);
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    margin-bottom: 20px;
}

.card-header.centered {
    text-align: center;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

/* Login Card */
.login-card {
    margin-top: 8px;
}

/* Input Group */
.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.input-prefix {
    padding: 14px 12px;
    font-size: 15px;
    color: var(--primary);
    font-weight: 600;
    border-left: 1px solid var(--border);
    background: rgba(0, 212, 255, 0.05);
}

.phone-input,
.id-input {
    flex: 1;
    padding: 14px 12px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    direction: ltr;
    text-align: left;
}

.phone-input::placeholder,
.id-input::placeholder {
    color: var(--text-muted);
}

.phone-input:focus,
.id-input:focus {
    outline: none;
}

.id-input-wrapper .input-prefix {
    color: var(--accent);
    background: rgba(255, 0, 110, 0.05);
}

.input-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Buttons */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-glow::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: 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Call Button */
.btn-call {
    background: linear-gradient(135deg, var(--success), #00cc6a);
    color: white;
    margin-top: 16px;
}

/* Payment Button */
.btn-payment {
    background: linear-gradient(135deg, var(--accent), #cc0058);
    color: white;
    margin-top: 16px;
    font-size: 16px;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.trust-icon {
    width: 16px;
    height: 16px;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: var(--glass);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    position: relative;
    z-index: 10;
}

.back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-spacer {
    width: 40px;
}

/* User Status Card */
.user-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.user-avatar {
    width: 80px;
    height: 80px;
}

.user-avatar.pulse {
    animation: avatar-pulse 2s infinite;
}

@keyframes avatar-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.user-status {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
}

.user-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* Call Card */
.call-card {
    margin-top: 8px;
}

.call-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(255, 0, 110, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-icon {
    width: 50px;
    height: 50px;
}

/* Security Features */
.security-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.security-icon {
    width: 18px;
    height: 18px;
}

/* Recent Section */
.recent-section {
    margin-top: 8px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-right: 8px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.recent-avatar {
    width: 40px;
    height: 40px;
}

.recent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.recent-time {
    font-size: 11px;
    color: var(--text-muted);
}

.call-status {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-status.success {
    color: var(--success);
}

.call-status svg {
    width: 16px;
    height: 16px;
}

/* Subscribe Page */
.subscribe-page {
    padding-top: 8px;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(255, 56, 96, 0.2));
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: var(--radius-sm);
    animation: alert-pulse 2s infinite;
}

@keyframes alert-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 110, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(255, 0, 110, 0.2); }
}

.alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 110, 0.2);
    border-radius: 50%;
    color: var(--accent);
    flex-shrink: 0;
}

.alert-icon svg {
    width: 24px;
    height: 24px;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alert-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.alert-text {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Target User Card */
.target-user-card {
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.target-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.target-user {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.target-avatar {
    width: 36px;
    height: 36px;
}

.target-username {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subscription Card */
.subscription-card {
    position: relative;
    overflow: visible;
}

.subscription-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--warning), #ff9500);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 183, 0, 0.4);
}

.subscription-badge svg {
    width: 16px;
    height: 16px;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-check {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 136, 0.2);
    border-radius: 50%;
    color: var(--success);
    flex-shrink: 0;
}

.feature-check svg {
    width: 14px;
    height: 14px;
}

.feature-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Price Section */
.price-section {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 16px 0;
}

.price-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.price-old {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-discount {
    padding: 4px 10px;
    background: rgba(255, 0, 110, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.price-main {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-amount {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--success), #00cc6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--success);
}

.price-note {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Urgency Banner */
.urgency-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 183, 0, 0.1);
    border: 1px solid rgba(255, 183, 0, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.urgency-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 183, 0, 0.2);
    border-radius: 50%;
    color: var(--warning);
    flex-shrink: 0;
}

.urgency-icon svg {
    width: 18px;
    height: 18px;
}

.urgency-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.urgency-text span:first-child {
    font-size: 13px;
    font-weight: 700;
    color: var(--warning);
}

.urgency-text span:last-child {
    font-size: 11px;
    color: var(--text-muted);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.trust-badge svg {
    width: 16px;
    height: 16px;
    color: var(--success);
}

/* Testimonials */
.testimonials-section {
    margin-top: 8px;
}

.testimonial-card {
    padding: 16px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.testimonial-stars svg {
    width: 16px;
    height: 16px;
    color: var(--warning);
}

.testimonial-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.testimonial-author {
    font-size: 11px;
    color: var(--text-muted);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 8, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-ring {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    animation: text-pulse 1.5s infinite;
}

@keyframes text-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Payment Animation */
.payment-animation {
    width: 80px;
    height: 60px;
    position: relative;
    overflow: hidden;
}

.card-swipe {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: swipe 1.5s infinite;
}

.card {
    width: 50px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes swipe {
    0% { transform: translateX(-100%); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Responsive */
@media (max-width: 360px) {
    .app-container {
        padding: 0 12px;
    }
    
    .glass-card {
        padding: 20px;
    }
    
    .price-amount {
        font-size: 36px;
    }
    
    .features-badge {
        flex-direction: column;
        align-items: center;
    }
    
    .badge {
        width: 100%;
        justify-content: center;
    }
}

/* Safe Area for Notch */
@supports (padding-top: env(safe-area-inset-top)) {
    .app-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* Selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}
