/**
 * Professional IP Address Lookup Website
 * Modern, responsive design with dark mode support
 * Author: Augment Agent
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Primary Colors & Gradients */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient-dark: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);

    /* Text Colors */
    --text-color: #333;
    --text-color-dark: #e2e8f0;

    /* Background Colors */
    --bg-color: #ffffff;
    --bg-color-dark: #1a202c;
    --card-bg: #ffffff;
    --card-bg-dark: #2d3748;

    /* Border Colors */
    --border-color: #e0e0e0;
    --border-color-dark: #4a5568;

    /* Text Secondary */
    --text-secondary: #666;
    --text-secondary-dark: #a0aec0;
    --text-muted: #999;
    --text-muted-dark: #718096;

    /* Header Background */
    --header-bg: rgba(255, 255, 255, 0.1);
    --header-bg-dark: rgba(45, 55, 72, 0.9);
}

/* Dark mode */
[data-theme="dark"] {
    --primary-gradient: var(--primary-gradient-dark);
    --text-color: var(--text-color-dark);
    --bg-color: var(--bg-color-dark);
    --card-bg: var(--card-bg-dark);
    --border-color: var(--border-color-dark);
    --header-bg: var(--header-bg-dark);
    --text-secondary: var(--text-secondary-dark);
    --text-muted: var(--text-muted-dark);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--primary-gradient);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Better centering for desktop */
@media (min-width: 1200px) {
    .container {
        padding: 0 3rem;
    }
}

/* Header */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.8;
}

/* Theme Toggle Button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.theme-icon {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-icon {
    transform: rotate(180deg);
}

/* Compact Hero Section */
.hero-section {
    background: var(--primary-gradient);
    padding: 3rem 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.ip-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0;
}

.ip-address {
    font-size: 2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* IP History Button */
.ip-history-button-container {
    margin-top: 2rem;
    text-align: center;
}

.ip-history-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
}

.ip-history-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.ip-history-btn:active {
    transform: translateY(0);
}

.history-icon {
    font-size: 1.2rem;
}

.history-text {
    font-weight: 600;
}

.history-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Info Section */
.info-section {
    background: var(--bg-color);
    padding: 4rem 0;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

/* Compact Main Content Layout */
.main-content {
    background: var(--bg-color);
    padding: 1rem 0;
    min-height: auto;
}

/* IP Summary Section - Removed as redundant */

/* Compact Information Cards Stack */
.info-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0;
}

/* Compact Location Grid Layout */
.location-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    align-items: start;
}

.location-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.location-map {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .location-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .location-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .location-map {
        order: -1;
    }
}

.sidebar-section {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transition: all 0.3s ease;
    width: 100%;
    height: fit-content;
    min-height: 100%;
}

/* Ensure sidebar cards fill the available width */
.sidebar-section .info-card {
    width: 100%;
    margin: 0;
    flex: 1;
}

/* Add visual distinction to sidebar */
.sidebar-section {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .sidebar-section {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Make sidebar cards more compact and fill space better */
.sidebar-section .info-card {
    margin-bottom: 0;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .sidebar-section .info-card {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive sidebar states */
.responsive-layout.sidebar-hidden {
    grid-template-columns: 1fr !important;
}

.responsive-layout.sidebar-hidden .sidebar-section {
    display: none !important;
}

/* Fallback: Hide empty sidebar automatically */
.sidebar-section:empty {
    display: none;
}

.sidebar-section:empty + .responsive-layout,
.responsive-layout:has(.sidebar-section:empty) {
    grid-template-columns: 1fr !important;
}

/* Alternative fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
    .responsive-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-section:not(:empty) ~ .responsive-layout,
    .responsive-layout:not(.sidebar-hidden) {
        grid-template-columns: 2fr 1fr;
    }
}

/* Clean up - IP Summary Card removed as it was redundant */

/* Location Card with Minimap - Full Width */
.location-card {
    width: 100%;
    margin-bottom: 0;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .location-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Minimap Styles */
.minimap-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.minimap {
    width: 100%;
    min-width: 350px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

[data-theme="dark"] .minimap {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.minimap:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .minimap:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-color);
    opacity: 0.7;
    gap: 1rem;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.map-info {
    text-align: center;
    color: var(--text-color);
    opacity: 0.8;
}

.map-info small {
    font-size: 0.85rem;
    font-style: italic;
}

/* Map iframe styling */
.minimap iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Sidebar Content Styles */
.quick-summary .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-label {
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.8;
}

.summary-value {
    font-weight: 500;
    color: var(--text-color);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.summary-value.ip-text {
    font-family: 'Courier New', monospace;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

[data-theme="dark"] .summary-value.ip-text {
    background: rgba(102, 126, 234, 0.2);
}

/* Security Tips Styles */
.security-tips .tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.security-tips .tip-item:last-child {
    border-bottom: none;
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.tip-content {
    flex: 1;
}

.tip-content strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.tip-content p {
    color: var(--text-color);
    opacity: 0.8;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Useful Tools Styles */
.useful-tools .tool-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.useful-tools .tool-item:last-child {
    border-bottom: none;
}

/* Quick Facts Styles */
.quick-facts .fact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-facts .fact-item:last-child {
    border-bottom: none;
}

.fact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.fact-content {
    flex: 1;
}

.fact-content strong {
    display: block;
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.fact-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.tool-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.tool-content {
    flex: 1;
}

.tool-content strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.tool-content p {
    color: var(--text-color);
    opacity: 0.8;
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Compact Info Card Design */
.info-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 4px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .info-card {
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .info-card:hover {
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Compact Card Design */
.card-header {
    padding: 1rem 1.5rem 0.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-icon {
    font-size: 1.5rem;
    display: block;
    flex-shrink: 0;
}

.card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Compact Card Content */
.card-content {
    padding: 0 1.5rem 1rem 1.5rem;
    flex: 1;
}

/* Compact Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item:hover {
    background: rgba(0, 0, 0, 0.02);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: 6px;
}

[data-theme="dark"] .info-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.info-item .label {
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-item .value {
    font-weight: 600;
    color: var(--text-color);
    text-align: right;
    font-size: 0.9rem;
}

/* Card Footer */
.card-footer {
    padding: 0;
    border-top: 1px solid var(--border-color);
}

/* Compact Tips Section */
.tips-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem 0;
    margin-top: 2rem;
}

[data-theme="dark"] .tips-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.section-header p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Compact Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Compact Tip Cards */
.tip-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .tip-card {
    background: var(--card-bg);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 1px 4px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .tip-card:hover {
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.tip-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.tip-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

/* Professional Card Header */
.card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 2rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

/* Animated gradient overlay */
.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.6s ease;
}

.card-header:hover::before {
    left: 100%;
}

/* Enhanced typography */
.card-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    position: relative;
    z-index: 2;
}

/* Enhanced Card Content */
.card-content {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

/* Professional Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.info-row:hover {
    background: rgba(0, 0, 0, 0.02);
    padding-left: 1rem;
    padding-right: 1rem;
    margin: 0 -1rem;
    border-radius: 8px;
}

[data-theme="dark"] .info-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.info-row:last-child {
    border-bottom: none;
}

/* Enhanced Typography */
.label {
    font-weight: 700;
    color: var(--text-color);
    opacity: 0.9;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
}

.label::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.info-row:hover .label::after {
    width: 100%;
}

.value {
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    font-size: 1rem;
    position: relative;
}

/* Features Section */
.features-section {
    background: var(--bg-color);
    padding: 4rem 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .features-section {
    background: var(--card-bg);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.features-subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    line-height: 1.6;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

[data-theme="dark"] .feature-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .feature-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.7;
    font-size: 1rem;
}

/* Ad Sections */
.ad-section {
    background: var(--bg-color);
    padding: 2rem 0;
    text-align: center;
    transition: all 0.3s ease;
}

[data-theme="dark"] .ad-section {
    background: var(--card-bg);
}

/* Ad Container Styles */
.ad-container {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: -8px;
    left: 10px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.7rem;
    padding: 0 0.5rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .ad-container {
    background: rgba(45, 55, 72, 0.5);
    border-color: #4a5568;
}

/* Header Ad */
.header-ad {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}

.header-ad::before {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Content Ad */
.content-ad {
    margin: 3rem 0;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar Ad */
.sidebar-ad {
    position: sticky;
    top: 100px;
    margin: 2rem 0;
    max-width: 300px;
}

/* Footer Ad */
.footer-ad {
    margin: 2rem 0 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-ad::before {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Mobile Ad */
.mobile-ad {
    display: none;
}

/* IP History Section */
.ip-history-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="dark"] .ip-history-section {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ip-history-section h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.history-description {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.history-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .history-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.history-item.current {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.history-ip {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.current-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.history-location,
.history-isp,
.history-time,
.history-visits {
    color: var(--text-color);
    opacity: 0.9;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-note {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.history-note small {
    color: var(--text-color);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .mobile-ad {
        display: block;
        margin: 2rem 0;
    }

    .sidebar-ad {
        display: none;
    }

    .content-ad {
        margin: 2rem 0;
    }

    .history-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ip-history-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
    box-sizing: border-box;
}

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

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.modal-body .history-description {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    font-style: italic;
    text-align: center;
}

.modal-body .history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.modal-body .history-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.modal-body .history-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .modal-body .history-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-body .history-item.current {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.modal-body .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-body .history-ip {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.modal-body .current-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body .history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.8rem;
}

.modal-body .history-location,
.modal-body .history-isp,
.modal-body .history-time,
.modal-body .history-visits {
    color: var(--text-color);
    opacity: 0.9;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body .history-note {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.modal-body .history-note small {
    color: var(--text-color);
    opacity: 0.7;
}

/* Mobile Modal Styles */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }

    .modal-header h2 {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-body .history-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .modal-body .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ip-history-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .history-count {
        font-size: 0.8rem;
    }
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
    transition: all 0.3s ease;
}

[data-theme="dark"] .footer {
    background: #1a202c;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

[data-theme="dark"] .footer-section h3 {
    color: #e2e8f0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section p,
.footer-section ul li {
    color: #bdc3c7;
    line-height: 1.6;
}

[data-theme="dark"] .footer-section p,
[data-theme="dark"] .footer-section ul li {
    color: #a0aec0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

[data-theme="dark"] .footer-bottom {
    border-top-color: #4a5568;
    color: #a0aec0;
}

/* Large Desktop Layout */
@media (min-width: 1600px) {
    .responsive-layout:not(.sidebar-hidden) {
        max-width: 1600px;
        grid-template-columns: 3fr 1fr;
        gap: 3rem;
    }
}

/* Medium-Large Desktop Layout */
@media (min-width: 1400px) and (max-width: 1599px) {
    .responsive-layout:not(.sidebar-hidden) {
        grid-template-columns: 2.8fr 1fr;
        gap: 2.5rem;
    }
}

/* Standard Desktop Layout */
@media (min-width: 1200px) and (max-width: 1399px) {
    .responsive-layout:not(.sidebar-hidden) {
        grid-template-columns: 2.5fr 1fr;
        gap: 2rem;
    }

    .secondary-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .minimap {
        min-width: 400px;
        height: 300px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .responsive-layout {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .sidebar-section {
        order: -1; /* Move sidebar above main content on tablets */
        display: flex !important; /* Always show sidebar on mobile/tablet */
    }

    .location-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .minimap {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Override sidebar hiding on mobile/tablet */
    .responsive-layout.sidebar-hidden .sidebar-section {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .ip-address {
        font-size: 1.8rem;
        padding: 0.8rem 1.5rem;
    }

    .ip-display {
        flex-direction: column;
        gap: 1rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .responsive-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .location-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .minimap {
        width: 100%;
        height: 150px;
        max-width: none;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .minimap-container {
        order: -1; /* Show map first on mobile */
    }

    /* Enhanced Mobile Styling */
    .ip-address {
        font-size: 2.5rem !important;
        letter-spacing: 1px;
    }

    .card-header {
        padding: 1.5rem 2rem;
    }

    .card-content {
        padding: 2rem;
    }

    .info-row {
        padding: 1rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .info-row .value {
        text-align: left;
        font-size: 0.95rem;
    }

    .info-row .label {
        font-size: 0.8rem;
    }

    /* Compact Mobile Layout */
    .main-content {
        padding: 1rem 0;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .ip-address {
        font-size: 1.6rem;
        padding: 0.5rem 1rem;
        letter-spacing: 0.5px;
    }

    .info-cards-stack {
        gap: 0.75rem;
    }

    .info-card {
        border-radius: 10px;
    }

    .card-header {
        padding: 0.75rem 1rem 0.25rem 1rem;
        gap: 0.5rem;
    }

    .card-icon {
        font-size: 1.25rem;
    }

    .card-header h3 {
        font-size: 1rem;
    }

    .card-content {
        padding: 0 1rem 0.75rem 1rem;
    }

    .location-details {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .info-item {
        padding: 0.25rem 0;
    }

    .info-item .label {
        font-size: 0.8rem;
    }

    .info-item .value {
        font-size: 0.85rem;
    }

    .tips-section {
        padding: 1.5rem 0;
        margin-top: 1rem;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tip-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .tip-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .tip-card h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .tip-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Small Mobile Devices (480px and below) - Enhanced Responsive */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
        margin: 0;
        max-width: 100%;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .ip-address {
        font-size: 1.4rem !important;
        padding: 0.75rem 1rem !important;
        margin: 1rem 0;
        word-break: break-all;
        line-height: 1.3;
        letter-spacing: 0.5px !important;
    }

    /* Map Container Responsive */
    .location-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }

    .minimap {
        width: 100% !important;
        height: 250px !important;
        max-width: 100% !important;
        margin: 0;
        border-radius: 8px;
    }

    .minimap iframe {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 8px;
    }

    /* Info Cards Responsive */
    .info-cards-stack {
        gap: 0.5rem;
    }

    .info-card {
        margin: 0;
        border-radius: 8px;
    }

    .card-header {
        padding: 0.5rem 0.75rem 0.25rem 0.75rem !important;
    }

    .card-header h3 {
        font-size: 0.9rem;
    }

    .card-content {
        padding: 0 0.75rem 0.5rem 0.75rem !important;
    }

    .location-details {
        gap: 0.125rem;
    }

    .info-item {
        padding: 0.125rem 0;
    }

    .info-item .label {
        font-size: 0.75rem;
    }

    .info-item .value {
        font-size: 0.8rem;
        word-break: break-word;
    }

    /* Sidebar Responsive */
    .sidebar-section {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }

    .sidebar-section h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    /* Button Responsive */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin: 0.5rem 0;
    }

    /* Modal Responsive */
    .modal-overlay {
        padding: 0.5rem;
    }

    .modal-content {
        width: calc(100% - 1rem);
        max-width: none;
        margin: 0.5rem;
        padding: 1rem;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }

    /* Footer Responsive */
    .footer-content {
        padding: 1rem 0.75rem;
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 0.5rem;
    }

    /* Tips Section Responsive */
    .tips-section {
        padding: 1rem 0;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .tips-grid {
        gap: 0.5rem;
    }

    .tip-card {
        padding: 0.75rem;
    }

    .tip-card h3 {
        font-size: 0.9rem;
    }

    .tip-card p {
        font-size: 0.8rem;
    }
}

/* Very Small Mobile Devices (410px and below) - Enhanced Location Info */
@media (max-width: 410px) {
    .container {
        padding: 0.4rem;
        max-width: 100%;
    }

    /* Location Information Specific Fixes */
    .info-card {
        margin: 0.5rem 0;
        border-radius: 8px;
    }

    .card-header {
        padding: 0.4rem 0.5rem 0.2rem 0.5rem !important;
    }

    .card-header h3 {
        font-size: 0.85rem;
        margin: 0;
    }

    .card-content {
        padding: 0 0.5rem 0.4rem 0.5rem !important;
    }

    /* Force vertical layout for info items */
    .info-item {
        display: block !important;
        padding: 0.3rem 0 !important;
        border-bottom: 1px solid var(--border-color);
        margin: 0;
    }

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

    .info-item .label {
        display: block;
        font-size: 0.65rem !important;
        font-weight: 600;
        color: var(--text-color);
        opacity: 0.7;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin-bottom: 0.15rem;
        line-height: 1.2;
    }

    .info-item .value {
        display: block;
        font-size: 0.75rem !important;
        font-weight: 500;
        color: var(--text-color);
        text-align: left !important;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.3;
        margin: 0;
        padding: 0;
    }

    /* Location Details */
    .location-details {
        gap: 0.2rem;
    }

    /* Map adjustments */
    .minimap {
        width: calc(100vw - 0.8rem) !important;
        max-width: calc(100vw - 0.8rem) !important;
        height: 200px !important;
        margin: 0 auto;
    }

    /* IP Address */
    .ip-address {
        font-size: 1.2rem !important;
        padding: 0.5rem 0.6rem !important;
        word-break: break-all;
        letter-spacing: 0.25px !important;
    }
}

/* Extra Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0.3rem;
    }

    .hero-title {
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .ip-address {
        font-size: 1.1rem !important;
        padding: 0.4rem 0.6rem !important;
        word-break: break-all;
        letter-spacing: 0.2px !important;
    }

    .minimap {
        width: calc(100vw - 0.6rem) !important;
        max-width: calc(100vw - 0.6rem) !important;
        height: 180px !important;
    }

    .card-header {
        padding: 0.3rem 0.4rem 0.1rem 0.4rem !important;
    }

    .card-header h3 {
        font-size: 0.8rem;
    }

    .card-content {
        padding: 0 0.4rem 0.3rem 0.4rem !important;
    }

    .info-item {
        padding: 0.25rem 0 !important;
    }

    .info-item .label {
        font-size: 0.6rem !important;
        margin-bottom: 0.1rem;
    }

    .info-item .value {
        font-size: 0.7rem !important;
        line-height: 1.2;
    }

    .sidebar-section {
        padding: 0.4rem;
    }

    .modal-content {
        padding: 0.6rem;
    }

    .btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }

    .tip-card {
        padding: 0.4rem;
    }

    .tip-card h3 {
        font-size: 0.8rem;
    }

    .tip-card p {
        font-size: 0.7rem;
    }
}

/* Mobile-First Responsive Fixes */
@media (max-width: 412px) {
    /* Specific fixes for 412px width devices */
    .container {
        padding: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .ip-address {
        font-size: 1.3rem !important;
        padding: 0.6rem 0.8rem !important;
        word-break: break-all;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .minimap {
        width: calc(100vw - 1rem) !important;
        max-width: calc(100vw - 1rem) !important;
        height: 220px !important;
        margin: 0 auto;
    }

    .info-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .card-content {
        overflow-x: auto;
        padding: 0 0.5rem 0.5rem 0.5rem !important;
    }

    /* Enhanced Location Information Fixes */
    .info-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 0.4rem 0;
        gap: 0.2rem;
    }

    .info-item .label {
        font-size: 0.7rem !important;
        font-weight: 600;
        color: var(--text-color);
        opacity: 0.7;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin-bottom: 0.1rem;
        width: 100%;
    }

    .info-item .value {
        font-size: 0.8rem !important;
        font-weight: 500;
        color: var(--text-color);
        text-align: left !important;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-width: 100%;
        width: 100%;
        line-height: 1.3;
    }

    /* Location Details Grid */
    .location-details {
        gap: 0.3rem;
    }

    /* Prevent horizontal scrolling */
    body {
        overflow-x: hidden;
    }

    .main-content {
        overflow-x: hidden;
    }

    /* Ensure text doesn't overflow */
    * {
        box-sizing: border-box;
    }

    .hero-title {
        word-break: break-word;
        hyphens: auto;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Responsive Text Utilities */
.text-responsive {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.no-overflow {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile-specific utilities */
@media (max-width: 480px) {
    .mobile-hidden {
        display: none;
    }

    .mobile-full-width {
        width: 100% !important;
        max-width: 100% !important;
    }

    .mobile-text-small {
        font-size: 0.8rem !important;
    }

    .mobile-padding-sm {
        padding: 0.5rem !important;
    }
}

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

.loading {
    animation: pulse 1.5s infinite;
}

/* ===== NEW SECTIONS STYLES ===== */

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin: 3rem 0;
}

.stats-section .section-header h2 {
    color: white;
}

.stats-section .section-header p {
    color: rgba(255, 255, 255, 0.9);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.stat-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.stat-value {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

/* News Section */
.news-section {
    background: var(--bg-color);
    padding: 4rem 0;
    margin: 3rem 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.news-category h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.news-header h4 {
    color: var(--text-color);
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.news-date {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.85rem;
    white-space: nowrap;
}

.news-item p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.news-source {
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.85rem;
}

.news-importance {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.importance-high {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.importance-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.importance-low {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

/* Timeline Section */
.timeline-section {
    background: var(--card-bg);
    padding: 4rem 0;
    margin: 3rem 0;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #667eea, #764ba2);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}

.timeline-item.left {
    left: 0;
    padding-right: 3rem;
}

.timeline-item.right {
    left: 50%;
    padding-left: 3rem;
}

.timeline-content {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    position: relative;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

.timeline-item.left .timeline-content::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-left-color: var(--bg-color);
}

.timeline-item.right .timeline-content::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-right-color: var(--bg-color);
}

.timeline-year {
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.timeline-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

/* Facts Section */
.facts-section {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    padding: 4rem 0;
    margin: 3rem 0;
}

[data-theme="dark"] .facts-section {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 50%, #4a5568 100%);
}

.facts-section .section-header h2 {
    color: #333;
}

[data-theme="dark"] .facts-section .section-header h2 {
    color: #e2e8f0;
}

.facts-section .section-header p {
    color: #666;
}

[data-theme="dark"] .facts-section .section-header p {
    color: #a0aec0;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.fact-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.fact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.fact-number {
    position: absolute;
    top: -15px;
    left: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.fact-card p {
    color: #333;
    line-height: 1.6;
    margin: 1rem 0 0 0;
    font-size: 0.95rem;
}

[data-theme="dark"] .fact-card {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .fact-card p {
    color: #e2e8f0;
}

/* Mobile Responsive for New Sections */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 3rem;
        padding-right: 0;
    }

    .timeline-item.left .timeline-content::after,
    .timeline-item.right .timeline-content::after {
        left: -10px;
        border-left-color: var(--bg-color);
        border-right-color: transparent;
    }

    .facts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
