/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background: #f8f9fa;
    color: #333;
    padding: 30px 0 20px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.logo-image {
    height: 80px;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-bottom: 5px;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Navigation */
.main-nav {
    background: #68c8ca;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 0;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 20px 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 16px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #f8f9fa;
    background: rgba(102, 126, 234, 0.1);
}

.nav-menu li:first-child a {
    background: #68c8ca;
    color: white;
}

.nav-menu li:first-child a:hover {
    background: #68c8ca;
    color: white;
}

/* Dropdown */
.dropdown {
    position: relative;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.category-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.category-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.category-card p {
    color: #666;
    line-height: 1.6;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    min-width: 160px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    text-align: center;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    padding: 12px 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
    display: block;
}

.dropdown-menu a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.dropdown-menu a.active {
    color: #d9d9d9;
}

/* Contact Modal */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
}

.contact-modal-content {
    position: relative;
    background: white;
    margin: 20px auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.contact-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    z-index: 2001;
}

.contact-close:hover {
    color: #ff6b6b;
}

.contact-modal .contact-header h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
}

.contact-modal .form-group {
    margin-bottom: 20px;
}

.contact-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.contact-modal .form-group input,
.contact-modal .form-group select,
.contact-modal .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contact-modal .form-group input:focus,
.contact-modal .form-group select:focus,
.contact-modal .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-modal .form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-modal .submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-modal .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.contact-modal .success-message {
    text-align: center;
    padding: 40px 20px;
}

.contact-modal .success-message h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.contact-modal .success-message .close-btn {
    background: #28a745;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    padding: 15px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

/* Main Content */
.main-content {
    padding: 20px 0;
    min-height: 60vh;
}

.main-content .container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    max-width: 864px;
}

.main-content h2 {
    text-align: center;
}

/* Ranking Section */
.ranking-section {
    margin-bottom: 40px;
}

.ranking-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2em;
}

.ranking-card {
    background: #f8f9fa;
    color: #333;
    padding: 30px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.ranking-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.ranking-content p {
    opacity: 0.9;
    margin-bottom: 15px;
}

.ranking-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9em;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Link Management Intro */
.link-management-intro {
    text-align: center;
    margin-bottom: 30px;
}

.link-management-intro h2 {
    color: #333;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.link-management-intro p {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

/* Ranking Site Card */
.ranking-site-card {
    background: #f8f9fa;
    color: #333;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    width: 40%;
    margin-left: auto;
    margin-right: auto;
}

.ranking-site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.card-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.click-icon {
    font-size: 2.25em;
    color: #ff8c00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-text h3 {
    font-size: 1.4em;
    margin: 0;
}

.shortcut-text {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Info Management Text */
.info-management-text {
    margin-bottom: 30px;
    text-align: left;
}

.info-management-text h2,
.info-management-text h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: left;
}

.info-management-text p {
    color: #666;
    line-height: 1.8;
    text-align: left;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.content-card {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.content-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.content-card p {
    color: #666;
    font-size: 0.95em;
}

/* Blog Styles */
.blog-content-grid {
    margin-top: 30px;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post-card {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 0;
    cursor: pointer;
    display: flex;
    align-items: stretch;
    min-height: 180px;
    transition: background-color 0.3s ease;
}

.blog-post-card:hover {
    background-color: #f8f9fa;
}

.blog-post-card:last-child {
    border-bottom: none;
}

.blog-thumbnail {
    width: 300px;
    height: 300px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
}

.blog-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-thumbnail img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-post-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.blog-post-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.blog-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #888;
    padding-top: 5px;
}

.post-date {
    font-weight: 500;
}

.post-views {
    color: #667eea;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.no-posts i {
    display: block;
    margin-bottom: 20px;
}

.no-posts p {
    font-size: 1.1em;
    margin: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.pagination-number {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-number:hover,
.pagination-number.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Footer */
.footer {
    padding: 20px 0;
    margin-top: 20px;
}

.footer .container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    margin: 0 auto;
    max-width: 864px;
}

.footer p {
    color: #333;
    margin: 0;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.secret-admin-link {
    cursor: pointer;
    user-select: none;
}



/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 400px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal .close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.modal .close:hover {
    color: #ff6b6b;
}

.modal h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
}

.modal form {
    margin-top: 20px;
}

.modal input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal input:focus {
    outline: none;
    border-color: #667eea;
}

.modal button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.remember-login {
    margin: 15px 0;
    text-align: left;
}

.remember-login label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.remember-login input {
    width: auto;
    margin-right: 8px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Modal-related styles moved to contact-modal.css */

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .hero-section {
        padding: 40px 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .logo-image {
        height: 60px;
    }

    .main-content .container {
        margin: 0 auto;
        max-width: calc(100% - 10px);
        padding: 30px 20px;
    }

    .footer .container {
        margin: 0 auto;
        max-width: calc(100% - 10px);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 15px 15px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        padding: 15px 25px;
        border-bottom: 1px solid #eee;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
    }

    .dropdown-menu a {
        padding-left: 45px;
    }

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

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .ranking-stats {
        flex-direction: column;
        gap: 10px;
    }

    .card-content {
        flex-direction: column;
        gap: 10px;
    }

    .form-container {
        width: 95%;
        padding: 30px 20px;
    }

    .modal-content {
        width: 90%;
        margin: 20% auto;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }

    .pagination-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }

    .contact-modal-content {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .contact-header h1 {
        font-size: 24px;
    }

    .contact-header p {
        font-size: 14px;
    }

    .contact-modal .form-group input,
    .contact-modal .form-group select,
    .contact-modal .form-group textarea {
        font-size: 16px;
    }

    .success-message {
        padding: 30px 15px;
    }

    .success-message h3 {
        font-size: 20px;
    }

    .success-message p {
        font-size: 14px;
    }
}

/* Page visibility */
.page {
    display: none;
}

.page.active {
    display: block;
}