/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: #e4e4e7;
    background: #0a0e27;
    background-image:
        radial-gradient(at 0% 0%, rgba(30, 58, 138, 0.3) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(17, 24, 39, 0.5) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(30, 58, 138, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(17, 24, 39, 0.4) 0px, transparent 50%);
    min-height: 100vh;
}

/* Main content layout */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero section */
.hero-section {
    text-align: center;
    margin-bottom: 5rem;
    padding: 4rem 0 3rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
}

/* Tools grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    grid-auto-rows: auto;
    column-gap: 2.5rem;
    row-gap: 3rem;
    margin-bottom: 5rem;
    align-items: stretch;
}

/* Tool pages */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.tool-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.25rem;
    line-height: 1.1;
}

.tool-header p {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.tool-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Full container width map */
world-map.map-full-width {
    display: block;
    width: 100%;
    height: 600px;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    world-map.map-full-width {
        height: 400px;
    }
}

/* Responsive design */
@media (min-width: 768px) {
    .tool-container {
        grid-template-columns: 1fr 1fr;
    }

    /* Make single components use full width */
    .tool-container > *:only-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1.25rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

    .tool-container {
        grid-template-columns: 1fr;
    }

    .tool-header h1 {
        font-size: 2.25rem;
    }

    .tool-header p {
        font-size: 1.05rem;
    }
}

/* Loading and animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
}

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

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Remove outline from cards and non-interactive elements */
.card:focus,
div:focus {
    outline: none;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .hero-section,
    nav-bar {
        display: none;
    }
}