/* ============================================
   Word Tools - Clean Modern Design
   ============================================ */

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

body {
    font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #f4f7f9;
}

a { color: #2196f3; text-decoration: none; }
a:hover { color: #1565c0; }

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

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 15px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.logo:hover { color: #2196f3; }

.logo-img {
    max-height: 40px;
    width: auto;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2196f3, #4caf50);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 5px;
    justify-content: center;
}

.main-nav a {
    display: block;
    padding: 8px 14px;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.main-nav a:hover {
    background: #f5f5f5;
    color: #2196f3;
}

.menu-toggle {
    display: none;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #fff;
}

.mobile-nav {
    display: none;
    padding: 10px 20px;
    border-top: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav a {
    display: block;
    padding: 12px 10px;
    color: #333;
    border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
    .header-container { 
        flex-wrap: wrap; 
        padding: 0 15px;
    }
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .mobile-nav.active { 
        display: block; 
        width: 100%;
    }
}

/* Main */
main { padding: 40px 0; }

/* Tool Section */
.tool-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 35px;
    margin-bottom: 40px;
}

.tool-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.tool-description {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

/* Form Elements - Unified */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    box-sizing: border-box;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #2196f3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #999;
}

select {
    width: 100%;
    padding: 14px 40px 14px 18px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    box-sizing: border-box;
    transition: all 0.2s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select:focus {
    outline: none;
    border-color: #2196f3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.tool-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 17px;
    font-family: inherit;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    background: #fafafa;
    color: #333;
    box-sizing: border-box;
}

.tool-input:focus {
    outline: none;
    border-color: #2196f3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

textarea.tool-input { min-height: 120px; resize: vertical; }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.filter { flex: 1; min-width: 140px; }
.filter label { display: block; font-size: 13px; font-weight: 600; color: #666; margin-bottom: 8px; }

/* Buttons */
button,
input[type="submit"],
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    margin-top: 16px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

button:hover,
input[type="submit"]:hover,
.btn-submit:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.4);
}

button:disabled,
.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Checkbox */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2196f3;
    cursor: pointer;
    border-radius: 4px;
}

/* Results */
.results-container {
    margin-top: 24px;
}

.results-area {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 25px;
    border: 1px solid #e0e0e0;
}

.results-count {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.result-group { margin-bottom: 20px; }
.result-group:last-child { margin-bottom: 0; }
.result-group h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2196f3;
    margin: 20px 0 3px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-words {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 768px) {
    .result-words {
        grid-template-columns: repeat(3, 1fr);
    }
}

.result-items { display: flex; flex-wrap: wrap; gap: 8px; }

.result-word {
    display: inline-block;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
}

.result-word:hover {
    background: #2196f3;
    color: #fff;
    border-color: #2196f3;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 16px;
    border: 1px solid #ffcdd2;
    font-weight: 500;
}

.hidden { display: none; }

/* Related */
.related-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 40px 35px;
    margin-top: 40px;
}

.related-section h2 {
    font-size: 26px;
    color: #2c3e50;
    margin-bottom: 8px;
    text-align: center;
}

.related-section .section-desc {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
}

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

.related-card {
    display: block;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.related-card:hover {
    background: #fff;
    border-color: #2196f3;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    text-decoration: none;
}

.related-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2196f3;
    margin-bottom: 8px;
}

.related-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #bdc3c7;
    padding: 50px 0 25px;
    margin-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: #bdc3c7; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }

.footer-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
}

/* Ads */
.ad-slot {
    margin: 20px 0;
    text-align: center;
    min-height: 100px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #999;
}

/* Cookie */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 9999;
}

.cookie-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text { flex: 1; min-width: 200px; }
.cookie-text h4 { font-size: 16px; color: #2c3e50; margin-bottom: 4px; }
.cookie-text p { font-size: 14px; color: #666; margin: 0; }
.cookie-text a { color: #2196f3; font-weight: 500; }

.cookie-buttons { display: flex; gap: 12px; flex-shrink: 0; }

.cookie-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    position: relative;
    z-index: 10000;
}

@media (max-width: 600px) {
    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: stretch;
    }
    .cookie-btn {
        flex: 1;
    }
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: #fff;
}

.cookie-btn-reject {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

/* Page */
.page-content {
    padding: 20px 0 0 0;
}

.page-content h1 { font-size: 34px; color: #2c3e50; margin-bottom: 25px; }
.page-content p { color: #555; margin-bottom: 18px; line-height: 1.8; }

/* 404 */
.not-found {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.not-found h1 { font-size: 80px; color: #e74c3c; margin-bottom: 15px; }
.not-found p { font-size: 18px; color: #666; }

/* Setup */
.setup-page {
    max-width: 480px;
    margin: 50px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

.setup-page h1 { text-align: center; font-size: 28px; color: #2c3e50; margin-bottom: 8px; }
.setup-page .setup-intro { text-align: center; color: #666; margin-bottom: 30px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; color: #444; margin-bottom: 8px; }
.form-group input { width: 100%; padding: 14px 16px; font-size: 15px; border: 2px solid #e0e0e0; border-radius: 8px; transition: border-color 0.2s; }
.form-group input:focus { outline: none; border-color: #2196f3; }

/* Admin */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50, #1a252f);
    color: #fff;
    padding: 25px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

.admin-sidebar h2 { font-size: 20px; padding: 0 20px; margin-bottom: 30px; }
.admin-sidebar nav a {
    display: block;
    padding: 14px 20px;
    color: #bdc3c7;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #2196f3;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    background: #f4f7f9;
}

.admin-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 25px;
    margin-bottom: 25px;
}

.admin-card h2 { font-size: 22px; color: #2c3e50; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #eee; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 20px;
}

.stat-card h3 { font-size: 13px; color: #7f8c8d; font-weight: 500; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 32px; font-weight: 700; color: #2c3e50; }

.list-item {
    border: 1px solid #eee;
    padding: 18px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #fff;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.list-item-title { font-weight: 600; font-size: 16px; color: #2c3e50; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-published { background: #e8f5e9; color: #2e7d32; }
.badge-draft { background: #ffebee; color: #c62828; }

/* Login */
.login-page {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 40px;
}

.login-page h1 { text-align: center; font-size: 26px; color: #2c3e50; margin-bottom: 30px; }

/* Responsive */
@media (max-width: 768px) {
    .tool-section { padding: 25px 20px; }
    .tool-section h1 { font-size: 26px; }
    .filters { flex-direction: column; }
    .filter { min-width: 100%; }
    .related-grid { grid-template-columns: 1fr; }
    .related-section { padding: 30px 20px; }
    .cookie-container { flex-direction: column; text-align: center; }
    .footer-container { grid-template-columns: 1fr; }
    .footer-tools-grid { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
}