/* ZMEX Style Design - Exact Match */
:root {
    --primary: #2d3748;
    --secondary: #4a5568;
    --accent: #ffd700;
    --success: #48bb78;
    --danger: #f56565;
    --warning: #ed8936;
    --dark: #1a202c;
    --light: #f7fafc;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

/* Header */
.zmex-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 16px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.zmex-header.hidden {
    transform: translateY(-100%);
}

.zmex-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-800);
}

.zmex-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flag-icon {
    width: 24px;
    height: 16px;
    border-radius: 2px;
}

.notification-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-600);
    cursor: pointer;
}

/* Main Content */
.zmex-container {
    padding: 80px 20px 100px;
    max-width: 100%;
}

/* Hero Card - Force Override All Styles */
.hero-card {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%) !important;
    background-color: #ff6b6b !important;
    color: white !important;
    border-radius: 24px !important;
    padding: 32px 24px !important;
    margin-bottom: 32px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.4) !important;
}

.hero-card .hero-title,
.hero-title {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.hero-card .hero-subtitle,
.hero-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-card .hero-badge,
.hero-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-subtitle {
i mean chack img this c    color: #059669;
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 600;
}

.hero-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 24px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.hero-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.hero-icon i {
    font-size: 32px;
    color: white;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.feature-wrapper {
    text-align: center;
}

.feature-item {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    transition: transform 0.2s;
    text-decoration: none;
    color: white;
}

.feature-item:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.feature-item i {
    font-size: 24px;
    color: white;
}

.feature-text {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

/* Invite Card */
.invite-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fef3c7 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
}

.invite-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.invite-subtitle {
    color: var(--gray-600);
    margin-bottom: 20px;
}

.invite-subtitle .accent {
    color: var(--accent);
    font-weight: 600;
}

.invite-btn {
    background: var(--accent);
    color: var(--gray-800);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.invite-btn:hover {
    transform: translateY(-1px);
}

/* Stock List */
.stock-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stock-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 16px 20px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.stock-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    z-index: -1;
}

.stock-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    transition: background 0.2s;
}

.stock-item:hover {
    background: var(--gray-50);
}

.stock-item:last-child {
    border-bottom: none;
}

.stock-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 16px;
    flex-shrink: 0;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.stock-info {
    flex: 1;
    min-width: 0;
}

.stock-symbol {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 16px;
    margin-bottom: 2px;
}

.stock-name {
    font-size: 14px;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stock-price {
    text-align: right;
    margin-right: 16px;
}

.price-value {
    font-weight: 600;
    font-size: 16px;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.price-change {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.price-change.positive {
    background: #dcfce7;
    color: var(--success);
}

.price-change.negative {
    background: #fee2e2;
    color: var(--danger);
}

.stock-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-trade {
    width: 50px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
    letter-spacing: 0.5px;
}

.btn-trade:visited,
.btn-trade:focus {
    color: white;
    text-decoration: none;
}

.btn-trade:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-trade:active {
    transform: scale(0.95);
}

.btn-buy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-sell {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-sell:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 8px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-800);
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
    min-width: 60px;
}

.nav-item.active {
    color: var(--gray-900);
    background: rgba(255,255,255,0.3);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

/* Forms & Modals */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 16px;
    background: white;
    margin-bottom: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--gray-800);
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.1);
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: none;
}

.alert-success {
    background: #dcfce7;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

/* Responsive */
@media (max-width: 480px) {
    .zmex-container {
        padding: 80px 16px 100px;
    }
    
    .hero-card {
        padding: 24px 20px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-icon {
        width: 60px;
        height: 60px;
        right: 20px;
    }
    
    .hero-icon i {
        font-size: 24px;
    }
    
    .feature-grid {
        gap: 16px;
    }
    
    .feature-item {
        width: 60px;
        height: 60px;
    }
    
    .feature-item i {
        font-size: 20px;
    }
    
    .stock-name {
        display: none;
    }
}

/* Additional Styles for Consistency */
.text-danger {
    color: var(--danger) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Enhanced Search Input */
#stockSearch {
    transition: all 0.3s ease;
}

#stockSearch:focus {
    border-color: #4facfe !important;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1) !important;
    transform: translateY(-1px);
}

/* Improved Stock Item Hover */
.stock-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Better Alert Styling */
.alert {
    border: none;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(220, 252, 231, 0.9);
    border-left-color: var(--success);
}

.alert-danger {
    background: rgba(254, 226, 226, 0.9);
    border-left-color: var(--danger);
}

/* Enhanced Feature Items */
.feature-item:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Smooth Animations */
* {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Page-specific Hero Cards - Force Override */
.hero-card,
.dashboard-hero,
.hero-card.dashboard-hero {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%) !important;
    background-color: #ff6b6b !important;
    color: white !important;
}

.portfolio-hero,
.hero-card.portfolio-hero {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%) !important;
    background-color: #48cae4 !important;
    color: white !important;
}

.profile-hero,
.hero-card.profile-hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    background-color: #f093fb !important;
    color: white !important;
}

.trade-hero,
.hero-card.trade-hero {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
    background-color: #4facfe !important;
    color: white !important;
}

/* Force all hero card text to be white */
.hero-card * {
    color: white !important;
}

/* Performance */
.stock-item, .feature-item, .nav-item, .btn-trade {
    will-change: transform;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .btn-trade {
        width: 45px;
        height: 30px;
        font-size: 8px;
    }
    
    .stock-actions {
        gap: 4px;
    }
    
    .hero-card {
        background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    }
}