
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}


.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}


header {
    padding: 30px 0;
    text-align: center;
}

.site-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 30px;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-box button {
    padding: 0 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #2980b9;
}


.category-section {
    margin-bottom: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
}

.category-image {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    margin-right: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.default-category-image {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background-color: #e3f2fd;
    color: #2196f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.category-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-right: auto;
}

.category-more {
    color: #3498db;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.category-more:hover {
    color: #2980b9;
    text-decoration: underline;
}


.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}


.website-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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


.website-logo {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f5f5f5;
}

.website-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.default-logo {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    background-color: #e8f4fd;
    color: #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}


.website-info {
    flex: 1;
}

.website-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.website-desc {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
}

.status-online {
    background-color: #4caf50; 
}

.status-offline {
    background-color: #9e9e9e; 
}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-logo-container {
    margin-bottom: 25px;
}

.modal-logo {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f5f5f5;
    margin: 0 auto;
}

.modal-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-info {
    width: 100%;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.modal-status {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
    font-size: 0.95rem;
}

.status-text {
    margin-left: 5px;
}

.modal-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.modal-url-container {
    margin-bottom: 15px;
    font-size: 0.95rem;
    word-break: break-all;
}

.url-label {
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.modal-url {
    color: #3498db;
    text-decoration: none;
}

.modal-url:hover {
    text-decoration: underline;
}

.modal-nofollow {
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.nofollow-label {
    color: #666;
    font-weight: 500;
    margin-right: 5px;
}

.visit-btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.visit-btn:hover {
    background-color: #2980b9;
}


footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 50px;
}


.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
}

.admin-sidebar h2 {
    padding: 0 20px 15px;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.admin-sidebar a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #34495e;
    transition: background-color 0.3s;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    background-color: #34495e;
}

.admin-content {
    flex: 1;
    padding: 30px;
    background-color: #ecf0f1;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 1.8rem;
    color: #2c3e50;
}

.admin-logout {
    color: #e74c3c;
    font-size: 0.9rem;
}


.form-container {
    background-color: white;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 1200;
    color: #34495e;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}


.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f1f1f1;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}


.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(22px);
}


.login-container {
    max-width: 400px;
    margin: 100px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

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

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.error-message {
    color: #e74c3c;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #fdecea;
    text-align: center;
}


@media (max-width: 768px) {
    .websites-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
    }
    
    .admin-sidebar a {
        display: inline-block;
        border-bottom: none;
        border-right: 1px solid #34495e;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
}
