/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-color: #212529;
    --white: #ffffff;
    --border-color: #dee2e6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav {
    display: block;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    padding: 5px 10px;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    list-style: none;
    min-width: 180px;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 30px 0;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
    background-image: url('../images/hero-bg.jpg'); /* Placeholder */
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

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

.btn-primary {
    background-color: var(--success-color);
    color: var(--white);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1e7e34;
}

/* Tool Cards Section */
.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card p {
    margin-bottom: 15px;
}

/* Tool Page Layout */
.tool-page-layout {
    display: flex;
    gap: 30px;
}

.tool-main {
    flex: 3;
}

.tool-sidebar {
    flex: 1;
    min-width: 250px;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

textarea.form-control {
    resize: vertical;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #0056b3;
}

/* Result Box */
.result-box {
    background-color: var(--white);
    border: 1px solid var(--success-color);
    border-left: 5px solid var(--success-color);
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

/* Adsense Placeholder */
.adsense-ad {
    background-color: #fff3cd;
    border: 1px dashed #ffeeba;
    color: #856404;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    font-style: italic;
}

/* Admin Panel Styles (Basic) */
.admin-nav {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.admin-nav li a {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-color);
}

.admin-nav li a.active {
    border-bottom: 2px solid var(--primary-color);
    font-weight: bold;
    color: var(--primary-color);
}

.admin-form {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: left;
}

.admin-table th {
    background-color: var(--light-bg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        width: 100%;
        order: 3;
        display: none;
        margin-top: 10px;
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        border-top: 1px solid var(--border-color);
    }

    .nav-link {
        display: block;
        padding: 10px 15px;
    }

    .menu-toggle {
        display: block;
    }

    .dropdown:hover .dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
    }

    .dropdown-menu {
        min-width: auto;
        padding-left: 20px;
    }

    .tool-page-layout {
        flex-direction: column;
    }

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

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