/* PhoneReview - Modern Vibrant Styles */

/* CSS Variables for easy theming */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --dark: #0f172a;
    --gray-900: #1e293b;
    --gray-800: #334155;
    --gray-700: #475569;
    --gray-600: #64748b;
    --gray-500: #94a3b8;
    --gray-400: #cbd5e1;
    --gray-300: #e2e8f0;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-primary: 0 8px 25px rgba(99, 102, 241, 0.35);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* General */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-100);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--gray-900);
}

.lead {
    color: var(--gray-600);
}

/* Cards - Modern Design */
.card {
    border: none;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.phone-card {
    overflow: hidden;
}

.phone-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.phone-card .card-img-top {
    transition: transform 0.3s ease;
}

.phone-card:hover .card-img-top {
    transform: scale(1.05);
}

.brand-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.brand-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-primary);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Buttons - Vibrant & Modern */
.btn {
    font-weight: 600;
    border-radius: var(--radius);
    padding: 0.625rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
}

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

.btn-warning {
    background: var(--gradient-accent);
    color: var(--dark);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Navigation - Modern */
.navbar {
    background: var(--gradient-primary) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-menu {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

/* Hero Section - Vibrant */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-section h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-section .lead {
    color: rgba(255,255,255,0.9);
}

/* Forms - Modern */
.form-control, .form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.input-group .btn {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Badges - Vibrant */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: var(--radius-full);
}

.bg-primary {
    background: var(--gradient-primary) !important;
}

.bg-success {
    background: var(--gradient-success) !important;
}

.bg-warning {
    background: var(--gradient-accent) !important;
    color: var(--dark) !important;
}

/* Search Dropdown */
#search-dropdown {
    z-index: 1050;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: none;
    overflow: hidden;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-200);
}

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

.search-result-item:hover {
    background-color: var(--gray-100);
}

/* Comparison Table - Modern */
.comparison-table {
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    vertical-align: middle;
    padding: 1rem;
}

.comparison-table thead th {
    background-color: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

/* Article Content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.article-content p {
    margin-bottom: 1.5rem;
}

/* Progress Bars - Modern */
.progress {
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    height: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
    background: var(--gradient-primary);
}

/* Pagination - Modern */
.pagination .page-link {
    color: var(--gray-700);
    border: none;
    margin: 0 4px;
    border-radius: var(--radius);
    font-weight: 600;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.pagination .page-link:hover {
    background-color: var(--gray-200);
    color: var(--primary);
}

/* Footer - Dark Modern */
footer {
    background: var(--gradient-dark) !important;
    margin-top: auto;
}

footer h5, footer h6 {
    color: white;
    font-weight: 700;
}

footer a {
    color: var(--gray-400);
    transition: all 0.2s ease;
}

footer a:hover {
    color: var(--primary-light) !important;
    transform: translateX(4px);
}

footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary);
    transform: translateY(-4px);
}

/* Specs Table */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(99, 102, 241, 0.03);
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
    gap: 0.5rem;
}

.nav-tabs .nav-link {
    color: var(--gray-600);
    font-weight: 600;
    border: none;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 0.875rem 1.5rem;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background: var(--gray-100);
    border-bottom: 3px solid var(--primary);
}

/* Breadcrumb */
.breadcrumb-item a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--gray-800);
    font-weight: 600;
}

/* Alerts - Modern */
.alert {
    border: none;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.alert-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Card Headers */
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem;
    font-weight: 700;
}

/* Images */
.img-thumbnail {
    border-radius: var(--radius);
    border: 2px solid var(--gray-200);
    padding: 4px;
}

/* List Groups */
.list-group-item {
    border-color: var(--gray-200);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.list-group-item-action:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

/* Compare Button */
.compare-btn {
    opacity: 0.8;
    transition: all 0.2s ease;
}

.compare-btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* Price Tags */
.price-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.125rem;
    display: inline-block;
}

/* Rating Stars */
.rating-stars {
    color: var(--accent);
}

/* Feature Icons */
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Section Headers */
.section-header {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Toast Notifications */
.toast {
    border-radius: var(--radius);
    border: none;
    box-shadow: var(--shadow-xl);
}

.toast-body {
    font-weight: 500;
    padding: 1rem 1.25rem;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    :root {
        --radius-lg: 12px;
        --radius-xl: 16px;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 3rem 0 !important;
    }
    
    .phone-card .card-img-top {
        height: 160px !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .btn,
    .compare-widget {
        display: none !important;
    }
    
    .card {
        border: 1px solid var(--gray-300) !important;
        box-shadow: none !important;
    }
    
    body {
        background: white !important;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment for dark mode support
    body {
        background-color: var(--dark);
        color: var(--gray-200);
    }
    
    .card {
        background: var(--gray-800);
    }
    */
}
