/* Global Styles & Dark Mode */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #0B0F19;
    color: #E2E8F0;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

/* Header */
header {
    text-align: center;
    margin: 40px 0;
}
header h1 {
    font-size: 2.5em;
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
header p { color: #94A3B8; }

/* Layout Containers */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* Leaderboard Section */
.leaderboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}
.leaderboard-card {
    background: #151C2C;
    border: 1px solid #2D3748;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.leaderboard-card h3 {
    margin-top: 0;
    border-bottom: 2px solid #06B6D4;
    padding-bottom: 10px;
    color: #06B6D4;
    font-size: 1.2em;
}
.leaderboard-card ol { padding-left: 20px; }
.leaderboard-card li { margin-bottom: 8px; }
.leaderboard-card a { color: #E2E8F0; text-decoration: none; transition: color 0.2s; }
.leaderboard-card a:hover { color: #06B6D4; }
.view-count { color: #64748B; font-size: 0.8em; }

/* Section Dividers */
.section-divider {
    margin: 40px 0 20px;
    border-bottom: 1px solid #2D3748;
    padding-bottom: 10px;
    font-size: 1.5em;
    color: #fff;
}

/* Tool Grid & Cards */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.tool-card {
    background: #151C2C;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #2D3748;
    text-decoration: none;
    color: #E2E8F0;
    transition: all 0.3s ease;
}
.tool-card:hover {
    border-color: #06B6D4;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
    transform: translateY(-4px);
}
.tool-card h3 { color: #06B6D4; margin-top: 0; }
.tool-card p { color: #94A3B8; font-size: 0.9em; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-link {
    text-decoration: none;
    color: #E2E8F0;
    background: #151C2C;
    padding: 10px 15px;
    border: 1px solid #2D3748;
    border-radius: 6px;
    transition: all 0.2s;
}
.page-link:hover { border-color: #06B6D4; color: #06B6D4; }
.page-link.active { background: #06B6D4; color: #0B0F19; border-color: #06B6D4; font-weight: bold; }

/* Tool Page UI (tool.php) */
.back-link { text-decoration: none; color: #06B6D4; display: inline-block; margin-bottom: 15px; }
.tool-container {
    background: #151C2C;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #2D3748;
    margin: 0 auto 40px;
}
.tool-container label { display: block; margin-bottom: 10px; color: #94A3B8; font-weight: bold; }
textarea {
    width: 100%;
    padding: 15px;
    background: #0B0F19;
    border: 1px solid #2D3748;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 15px;
    color: #E2E8F0;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}
button {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
    color: white;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}
button:hover { opacity: 0.9; transform: translateY(-2px); }
button:disabled { background: #2D3748; cursor: not-allowed; transform: none; }
#loading { margin-top: 15px; color: #06B6D4; font-style: italic; }

/* Ad Container */
.ad-container {
    background: #151C2C;
    border: 1px dashed #2D3748;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 30px 0;
    color: #94A3B8;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SEO Content */
.seo-content {
    max-width: 800px;
    margin: 40px auto;
    line-height: 1.7;
}
.seo-content h2 { color: #06B6D4; border-bottom: 2px solid #2D3748; padding-bottom: 5px; }
.seo-content a { color: #06B6D4; }


/* Responsive Banner Ad Rules */
.ad-container a {
    display: inline-block;
    max-width: 100%;
}

.ad-container img {
    max-width: 100%;      /* Ensures the image never exceeds the screen width */
    height: auto;         /* Automatically adjusts the height to maintain aspect ratio */
    border-radius: 8px;  /* Matches the rounded corners of your dark theme */
    display: block;
}
/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}
.filter-btn {
    background: #151C2C;
    border: 1px solid #2D3748;
    color: #94A3B8;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    background: #06B6D4;
    color: #0B0F19;
    border-color: #06B6D4;
}

/* Category Badge */
.tool-cat-badge {
    display: inline-block;
    background: #2D3748;
    color: #06B6D4;
    font-size: 0.7em;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Recently Used */
.recent-container {
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid #2D3748;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}
.recent-title { margin-top: 0; color: #06B6D4; font-size: 1.1em; }
.recent-list { display: flex; flex-wrap: wrap; gap: 15px; }
.recent-link {
    color: #E2E8F0; 
    text-decoration: none; 
    background: #151C2C; 
    padding: 5px 10px; 
    border-radius: 6px;
    font-size: 0.9em;
}
.recent-link:hover { text-decoration: underline; }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.btn-secondary {
    background: #2D3748 !important;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: inline-block;
}
.btn-secondary:hover { background: #3D4759 !important; }
























































