:root {
    --primary: #FF6B9D;
    --primary-light: #FF8FB1;
    --secondary: #7E5BEF;
    --accent: #FFD166;
    --mint-green: #06D6A0;
    --mint-dark: #04A37C;
    --background: #0f0f23;
    --card-bg: #1a1a2e;
    --card-hover: #252547;
    --text: #e2e2e2;
    --text-light: #a0a0a0;
    --text-lighter: #888888;
    --success: #4ECDC4;
    --warning: #FF9E64;
    --error: #FF6B6B;
    --border-radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --glow: 0 0 20px rgba(255, 107, 157, 0.3);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --orange-start: #f88e67;
    --orange-mid: #ff9c78;
    --mint-start: #06D6A0;
    --mint-end: #04A37C;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite linear;
}

.star {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 3s infinite alternate;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-100vh) rotate(360deg); }
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    margin-bottom: 40px;
    padding: 40px 35px;
    background: linear-gradient(135deg, var(--card-bg) 0%, #252547 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    min-width: 0;
}

.cat-logo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    box-shadow: var(--glow);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}

.cat-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
}

#logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    display: none;
    transition: var(--transition);
}

#logo-image.loaded {
    display: block;
}

.logo-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
}

.title-section {
    min-width: 0;
    flex: 1;
}

.title-section h1 {

    background: linear-gradient(135deg, var(--orange-start) 0%, var(--orange-mid) 25%, var(--mint-start) 75%, var(--mint-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 3.5rem;
    margin-bottom: 8px;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    line-height: 1.1;
    position: relative;
    display: inline-block;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 0;
}

.server-info-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
    flex-shrink: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.info-label {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    flex-shrink: 0;
}

.info-item span:last-child {
    font-weight: 600;
    color: var(--text);
    font-size: 1rem;
    text-align: right;
    flex-shrink: 0;
}

.mirrors-section {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 50px;
}

.os-section {
    margin-bottom: 30px;
}

.os-title {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.ubuntu-title {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(255, 107, 157, 0.3);
}

.mint-title {
    color: var(--mint-green);
    text-shadow: 0 0 20px rgba(6, 214, 160, 0.3);
}

.mirrors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.mirror-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.mirror-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.mirror-card.ubuntu::before {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.mirror-card.mint::before {
    background: linear-gradient(90deg, var(--mint-green), var(--mint-dark));
}

.mirror-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow), 0 10px 40px rgba(0, 0, 0, 0.4);
    background: var(--card-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.mirror-card h2 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.storage-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.storage-label {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
}

.storage-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.ubuntu .storage-value {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
}

.mint .storage-value {
    color: var(--mint-green);
    text-shadow: 0 0 10px rgba(6, 214, 160, 0.3);
}

button.load-files {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    width: 100%;
    max-width: 300px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

button.load-files::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

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

.mint button.load-files {
    background: linear-gradient(135deg, var(--mint-green), var(--mint-dark));
}

button.load-files:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

button.load-files:active {
    transform: translateY(0);
}

button.load-files:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    font-size: 0.95rem;
}

.file-list {
    margin-top: 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.file-list.active {
    max-height: none;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(255, 255, 255, 0.1);
}

.file-list.active::-webkit-scrollbar {
    width: 8px;
}

.file-list.active::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.file-list.active::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.file-list.active::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.file-list ul {
    list-style-type: none;
    padding-left: 0;
}

.file-list li {
    padding: 15px 20px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.file-list li::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.3s ease;
}

.file-list li:hover::before {
    left: 100%;
}

.file-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.ubuntu .file-list li:hover {
    border-left: 4px solid var(--primary);
}

.mint .file-list li:hover {
    border-left: 4px solid var(--mint-green);
}

.file-list li.downloading {
    color: var(--warning);
    background: rgba(255, 158, 100, 0.1);
    border-left: 4px solid var(--warning);
}

.file-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-name {
    flex-grow: 1;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
    overflow-wrap: break-word;
}

.file-list a.file-name {
    text-decoration: none;
    transition: var(--transition);
}

.ubuntu .file-list a.file-name:hover {
    color: var(--primary-light);
}

.mint .file-list a.file-name:hover {
    color: var(--mint-green);
}

.file-list a.file-name:hover {
    text-decoration: underline;
}

/* Iconos de estado */
.check-icon, .download-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.check-icon {
    color: var(--success);
}

.download-icon {
    color: var(--warning);
}

.download-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.download-status {
    color: var(--warning);
    font-style: italic;
    font-size: 0.9rem;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cat-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    font-size: 1rem;
    color: var(--text-lighter);
}

.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.empty-state {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 968px) {
    .header-main {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .logo-section {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .server-info-header {
        width: 100%;
        min-width: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .title-section h1 {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .mirrors-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .mirror-card {
        padding: 25px 20px;
    }
    
    .storage-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .os-title {
        font-size: 1.7rem;
    }
    
    header {
        padding: 30px 25px;
    }
    
    .cat-logo {
        width: 90px;
        height: 90px;
    }
    
    .file-list.active {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .cat-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-loading {
        font-size: 20px;
    }
    
    .server-info-header {
        padding: 20px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .title-section h1 {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .file-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .download-info {
        align-self: flex-end;
    }
}