:root {
    --primary-color: #007AFF;
    --background-color: #f5f5f7;
    --card-background: rgba(255, 255, 255, 0.95);
    --text-color: #1d1d1f;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #f0f0f0;
    --secondary-text: #6e6e73;
}

[data-theme="dark"] {
    --primary-color: #0A84FF;
    --background-color: #000000;
    --card-background: rgba(30, 30, 30, 0.95);
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --border-color: #333333;
    --secondary-text: #999999;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    position: relative;
    z-index: 1;
    background: transparent;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--primary-color), #00c6ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    animation: slideUp 0.5s ease-out forwards;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: var(--text-color);
}

.card.active-nodes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.node-count {
    text-align: center;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.node-count .label {
    display: block;
    font-size: 1rem;
    color: var(--secondary-text);
}

.country-list {
    list-style: none;
}

.country-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
    animation: slideIn 0.3s ease-out forwards;
}

.country-list li:last-child {
    border-bottom: none;
}

.country-flag {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.country-list li span {
    display: flex;
    align-items: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.storage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.storage-stat {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-text);
}

@media (max-width: 1024px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1rem;
    }

    .storage-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Theme switch styles */
.theme-switch {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

.theme-toggle {
    background: var(--card-background);
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: all 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
}

.sun-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

.logo-container {
    margin-bottom: 2rem;
}

.logo {
    height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
}

.light-logo {
    display: block;
}

.dark-logo {
    display: none;
}

[data-theme="dark"] .light-logo {
    display: none;
}

[data-theme="dark"] .dark-logo {
    display: block;
}

[data-theme="dark"] .logo {
    filter: invert(1);
}

.footer {
    margin-top: auto;
    padding: 2rem;
    background: var(--card-background);
    box-shadow: 0 -5px 15px var(--shadow-color);
    position: relative;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #0056b3;
} 