@import url('https://fonts.googleapis.com/css2?family=Tahoma&family=Verdana&display=swap');

/* =========================================================
   AUTHENTIC 2000s TOPLIST DESIGN (TITLE H3, DESC H4 FOR MAXIMUM SEO)
   ========================================================= */

:root {
    --bg-page: #0a101d;
    --bg-header: linear-gradient(180deg, #1b2a47 0%, #0d172a 100%);
    --bg-table-header: linear-gradient(180deg, #3b5998 0%, #294073 100%);
    --bg-card-even: #131f37;
    --bg-card-odd: #182744;
    --bg-card-hover: #1e3156;
    
    --border-blue: #3b5998;
    --text-white: #ffffff;
    --text-yellow: #ffee58;
    --text-muted: #94a3b8;
    
    --font-main: 'Tahoma', 'Verdana', sans-serif;
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-white);
    font-family: var(--font-main);
    font-size: 12px;
    line-height: 1.4;
    background-image: linear-gradient(180deg, #09101f 0%, #040812 100%);
    min-height: 100vh;
    padding-bottom: 40px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 10px;
}

/* Header Y2K 2000s Style */
header {
    background: var(--bg-header);
    border-bottom: 3px solid #3b5998;
    padding: 18px 0 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    margin-bottom: 15px;
}

.header-badge {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(180deg, #fff59d 0%, #fbc02d 100%);
    color: #000;
    font-weight: bold;
    font-size: 10px;
    text-transform: uppercase;
    border: 1px solid #fffde7;
    border-radius: 3px;
    margin-bottom: 6px;
}

header h1 {
    font-size: 2.3rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 0px #000;
    letter-spacing: -0.5px;
}

header p {
    color: #b0bec5;
    font-size: 12px;
    margin-top: 2px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(180deg, #2c426f 0%, #17243e 100%);
    border: 1px solid #4a6dae;
    border-radius: 4px;
    padding: 6px 16px;
    text-align: center;
}

.stat-card .val {
    font-size: 1.4rem;
    font-weight: bold;
    color: #ffee58;
}

.stat-card .lbl {
    font-size: 10px;
    color: #b0bec5;
    text-transform: uppercase;
    font-weight: bold;
}

/* 3x 250x250 Top Sponsor Banner Grid */
.banner-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 15px 0 25px;
}

.banner-box {
    width: 250px;
    height: 250px;
    background: #000;
    border: 2px solid #3b5998;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
}

.banner-box:hover {
    border-color: #ffee58;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(255, 238, 88, 0.4);
}

.banner-box img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Controls Header 2000s Bar */
.controls {
    background: var(--bg-table-header);
    border: 1px solid #4a6dae;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-btn {
    background: linear-gradient(180deg, #2c426f 0%, #1a2844 100%);
    border: 1px solid #4a6dae;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.filter-btn:hover, .filter-btn.active {
    background: linear-gradient(180deg, #fbc02d 0%, #f57f17 100%);
    color: #000;
    border-color: #fff59d;
}

.btn-add-site {
    background: linear-gradient(180deg, #43a047 0%, #1b5e20 100%);
    border: 1px solid #81c784;
    color: #ffffff;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    text-shadow: 1px 1px 1px #000;
}

/* Entire Table Row Clickable with Title H3 and Desc H4 */
.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rank-item {
    background: var(--bg-card-even);
    border: 1px solid #243556;
    border-radius: 4px;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 50px 1fr 140px 110px;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.rank-item:nth-child(odd) {
    background: var(--bg-card-odd);
}

.rank-item:hover {
    background: var(--bg-card-hover);
    border-color: #60a5fa;
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.rank-item.rank-1 {
    border-left: 4px solid #ffee58;
    background: linear-gradient(90deg, rgba(255, 238, 88, 0.08) 0%, var(--bg-card-even) 100%);
}
.rank-item.rank-2 { border-left: 4px solid #e0e0e0; }
.rank-item.rank-3 { border-left: 4px solid #ffb74d; }

.rank-number {
    font-size: 1.4rem;
    font-weight: bold;
    text-align: center;
    color: #78909c;
}

.rank-1 .rank-number { color: #ffee58; text-shadow: 1px 1px 2px #000; }
.rank-2 .rank-number { color: #e0e0e0; }
.rank-3 .rank-number { color: #ffb74d; }

/* Title H3 styling */
.rank-details h3 {
    font-size: 14.5px;
    font-weight: bold;
    margin-bottom: 3px;
    line-height: 1.3;
}

.rank-details h3 a {
    color: #64b5f6;
    text-decoration: none;
}

.rank-item:hover .rank-details h3 a {
    text-decoration: underline;
    color: #ffee58;
}

/* Description H4 styling for boosted SEO weight */
.rank-details h4.rank-desc {
    color: #cbd5e1;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.45;
    margin-bottom: 4px;
}

.rank-tags {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.tag {
    font-size: 9.5px;
    padding: 2px 7px;
    background: #080d16;
    border: 1px solid #243556;
    border-radius: 2px;
    color: #94a3b8;
}

.tag-badge {
    background: #e65100;
    border-color: #ff9800;
    color: #fff;
    font-weight: bold;
}

.rank-stats {
    text-align: right;
    font-size: 10px;
    color: #94a3b8;
}

.stat-item strong {
    color: #fff;
    font-size: 11.5px;
}

.btn-vote {
    background: linear-gradient(180deg, #1e88e5 0%, #1565c0 100%);
    border: 1px solid #64b5f6;
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 10.5px;
    cursor: pointer;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
    display: block;
}

.btn-vote:hover {
    background: linear-gradient(180deg, #1565c0 0%, #0d47a1 100%);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: #131f37;
    border: 2px solid #3b5998;
    border-radius: 5px;
    width: 100%;
    max-width: 420px;
    padding: 18px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #243556;
    padding-bottom: 6px;
}

.modal-header h2 {
    font-size: 13px;
    color: #ffee58;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 9.5px;
    color: #b0bec5;
    margin-bottom: 2px;
    font-weight: bold;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 5px 8px;
    background: #080d16;
    border: 1px solid #243556;
    border-radius: 3px;
    color: #fff;
    font-size: 10.5px;
    font-family: var(--font-main);
}

/* Footer */
footer {
    margin-top: 25px;
    text-align: center;
    padding: 15px 0;
    border-top: 1px solid #243556;
    color: #64748b;
    font-size: 10px;
}

@media (max-width: 850px) {
    .rank-item {
        grid-template-columns: 35px 1fr;
        grid-template-rows: auto auto;
    }
    .rank-stats, .btn-vote {
        grid-column: span 2;
        text-align: left;
    }
}
