:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c2c;
    --light-green: #6b9d3e;
    --hover-green: #88b755;
    --background: #1a1a1a;
    --card-bg: #2a2a2a;
    --text-light: #e8f5e9;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(15, 42, 15, 0.9) 100%),
        url('/static/collared-dove.jpg') center/cover no-repeat fixed;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

/* Imagen de fondo optimizada para móviles */
@media (max-width: 768px) {
    body {
        background: 
            linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(15, 42, 15, 0.9) 100%),
            url('/static/collared-dove-mobile.jpg') center/cover no-repeat fixed;
    }
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--hover-green);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    opacity: 0.8;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    flex: 1;
}

.card {
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.1) 0%,
        rgba(45, 80, 22, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 157, 62, 0.3);
    border-radius: 20px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(136, 183, 85, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

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

.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(136, 183, 85, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(136, 183, 85, 0.6);
    box-shadow: 
        0 15px 40px 0 rgba(107, 157, 62, 0.3),
        0 5px 15px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.2) 0%,
        rgba(45, 80, 22, 0.15) 100%
    );
}

.card:hover::after {
    opacity: 1;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.card:hover .card-icon {
    transform: scale(1.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.card-description {
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.network-badge {
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid;
    animation: pulse-subtle 3s ease-in-out infinite;
}

.network-alpha {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.25) 0%, rgba(255, 87, 34, 0.25) 100%);
    border-color: rgba(255, 152, 0, 0.5);
    color: #ffb74d;
}

.network-beta {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.25) 0%, rgba(30, 136, 229, 0.25) 100%);
    border-color: rgba(33, 150, 243, 0.5);
    color: #64b5f6;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
    opacity: 0.7;
    font-size: 0.9rem;
    width: 100%;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 2rem;
}

.error-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    opacity: 0.8;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hover-green);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-light);
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.back-button {
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.2) 0%,
        rgba(45, 80, 22, 0.15) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-light);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(107, 157, 62, 0.4);
    display: inline-block;
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.back-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(136, 183, 85, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.back-button:hover::before {
    left: 100%;
}

.back-button:hover {
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.3) 0%,
        rgba(45, 80, 22, 0.2) 100%
    );
    border-color: rgba(136, 183, 85, 0.6);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 8px 24px 0 rgba(107, 157, 62, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

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

    .grid-container {
        grid-template-columns: 1fr;
    }
    
    .error-title {
        font-size: 1.8rem;
    }

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

    .status-header h1 {
        font-size: 2rem;
    }

    .server-name {
        font-size: 1.5rem;
    }
}

/* Estilos para página de estado de servidores */
.status-header {
    text-align: center;
    margin-bottom: 3rem;
}

.status-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.status-header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.server-card {
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.1) 0%,
        rgba(45, 80, 22, 0.05) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 157, 62, 0.3);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(136, 183, 85, 0.15),
        transparent
    );
    transition: left 0.5s ease;
}

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

.server-card.online {
    border-color: rgba(136, 183, 85, 0.6);
    box-shadow: 
        0 8px 32px 0 rgba(107, 157, 62, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.15) 0%,
        rgba(45, 80, 22, 0.1) 100%
    );
}

.server-card.offline {
    border-color: rgba(198, 40, 40, 0.6);
    box-shadow: 
        0 8px 32px 0 rgba(198, 40, 40, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    background: linear-gradient(
        135deg,
        rgba(198, 40, 40, 0.1) 0%,
        rgba(120, 20, 20, 0.05) 100%
    );
}

.server-card.checking {
    border-color: rgba(255, 167, 38, 0.6);
    box-shadow: 
        0 8px 32px 0 rgba(255, 167, 38, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    background: linear-gradient(
        135deg,
        rgba(255, 167, 38, 0.1) 0%,
        rgba(200, 130, 30, 0.05) 100%
    );
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.server-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.server-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.server-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.server-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--hover-green);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.status-badge.online {
    background: rgba(107, 157, 62, 0.2);
    color: var(--hover-green);
}

.status-badge.offline {
    background: rgba(198, 40, 40, 0.2);
    color: #ff5252;
}

.status-badge.checking {
    background: rgba(255, 167, 38, 0.2);
    color: #ffa726;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--hover-green);
}

.status-dot.offline {
    background: #ff5252;
    animation: none;
}

.status-dot.checking {
    background: #ffa726;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.server-info {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.server-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.server-specs {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    font-style: italic;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.server-details {
    display: grid;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    font-weight: 600;
    opacity: 0.7;
}

.detail-value {
    font-family: 'Courier New', monospace;
    color: var(--hover-green);
}

.auto-refresh {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(107, 157, 62, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.2) 0%,
        rgba(45, 80, 22, 0.15) 100%
    );
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 157, 62, 0.4);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.back-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(136, 183, 85, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.back-link:hover::before {
    left: 100%;
}

.back-link:hover {
    background: linear-gradient(
        135deg,
        rgba(107, 157, 62, 0.3) 0%,
        rgba(45, 80, 22, 0.2) 100%
    );
    border-color: rgba(136, 183, 85, 0.6);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 8px 24px 0 rgba(107, 157, 62, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}
