
/* CTFs Container */
.ctfs-container {
    padding: 2rem 0;
}

/* Year Sections */
.year-section {
    margin-bottom: 3rem;
}

.year-title {
    color: #FFD700;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

.year-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(45deg, #FFD700, #FF8C00);
    border-radius: 2px;
}

/* Table Container */
.table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* CTF Table */
.ctf-table {
    width: 100%;
    border-collapse: collapse;
}

.ctf-table th {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ctf-table td {
    padding: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.ctf-row {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ctf-row:hover {
    background: rgba(255, 215, 0, 0.05);
}

.edition {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.rank {
    font-weight: 600;
    color: #FFD700;
}

.rank-placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Admin CTF Actions */
.admin-ctf-actions {
    display: inline-flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.modal-header h2 {
    margin: 0;
    color: #FFD700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #FFD700;
}

.modal-body {
    padding: 1.5rem;
}

.ctf-details {
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.detail-item strong {
    color: #FFD700;
    min-width: 120px;
    margin-right: 1rem;
}

.detail-item span {
    color: rgba(255, 255, 255, 0.8);
}

.related-writeups h3 {
    color: #FFD700;
    margin-bottom: 1rem;
}

.writeups-list {
    display: grid;
    gap: 1rem;
}

.writeup-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.writeup-item:hover {
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.writeup-item a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.writeup-item a:hover {
    color: #FFD700;
}

.writeup-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state i {
    font-size: 4rem;
    color: rgba(255, 215, 0, 0.3);
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {

    .ctf-table th,
    .ctf-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .detail-item strong {
        min-width: auto;
        margin-right: 0;
    }
    
    .admin-ctf-actions {
        margin-left: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ctf-table {
        font-size: 0.9rem;
    }
    
    .ctf-table th,
    .ctf-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .year-title {
        font-size: 1.5rem;
    }
    
    .admin-ctf-actions {
        display: block;
        margin-top: 0.5rem;
        margin-left: 0;
    }
}