body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    color: #333;
    background-color: #f9f9f9;
    font-size: 16px; /* Base font size for rem/em */
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo a {
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin: 0.5rem 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

nav ul li a:hover {
    text-decoration: underline;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.three-column {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sidebar {
    flex: 1;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    min-width: 200px;
}

.left-sidebar, .right-sidebar {
    max-width: 250px;
    width: 100%;
}

.body-content {
    flex: 2;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
}

h1 {
    color: #2c3e50;
    font-size: 2rem;
}

h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

p {
    line-height: 1.6;
    font-size: 1rem;
}

.error {
    color: red;
    font-weight: bold;
    font-size: 0.9rem;
}

.success {
    color: green;
    font-weight: bold;
    font-size: 0.9rem;
}

.button-green {
    display: inline-block;
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    margin: 10px 0;
    font-size: 1rem;
}

.button-green:hover {
    background-color: #219653;
}

.button-blue {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    margin: 10px 0;
    font-size: 1rem;
}

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

.button-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.button-container span {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.chickens-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    box-sizing: border-box;
}

.subscribe-section, .subscriber-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 2rem auto;
    width: 100%;
    box-sizing: border-box;
}

.login-form, .subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.login-form label, .subscribe-form label {
    font-weight: bold;
    font-size: 1rem;
}

.login-form input, .login-form select, .login-form textarea,
.subscribe-form input, .subscribe-form select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

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

.login-form button, .subscribe-form button {
    padding: 10px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    max-width: 200px;
}

.login-form button:hover, .subscribe-form button:hover {
    background-color: #34495e;
}

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

.chicken-table th, .chicken-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
    font-size: 0.9rem;
}

.chicken-table th {
    background-color: #2c3e50;
    color: white;
}

.chicken-table img {
    max-width: 50px;
    height: auto;
    display: block;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
    width: 100%;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

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

/* Responsive Design */
@media screen and (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 10px 0;
    }

    main {
        margin: 1rem auto;
        padding: 0 10px;
    }

    .three-column {
        flex-direction: column;
    }

    .sidebar, .body-content {
        max-width: 100%;
        min-width: 0;
    }

    .left-sidebar, .right-sidebar {
        max-width: 100%;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    p, .error, .success, .button-container span {
        font-size: 0.85rem;
    }

    .button-green, .button-blue {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .login-form, .subscribe-form {
        max-width: 100%;
    }

    .login-form button, .subscribe-form button {
        max-width: 100%;
    }

    .chickens-section, .subscribe-section, .subscriber-section {
        padding: 15px;
    }

    .chicken-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .chicken-table th, .chicken-table td {
        padding: 8px;
        font-size: 0.8rem;
    }

    .chicken-table img {
        max-width: 40px;
    }
}

@media screen and (max-width: 480px) {
    nav .logo a {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1rem;
    }

    .button-green, .button-blue {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .login-form label, .subscribe-form label {
        font-size: 0.9rem;
    }

    .login-form input, .login-form select, .login-form textarea,
    .subscribe-form input, .subscribe-form select {
        padding: 6px;
        font-size: 0.9rem;
    }

    .login-form button, .subscribe-form button {
        padding: 8px;
        font-size: 0.9rem;
    }

    .chicken-table th, .chicken-table td {
        padding: 6px;
        font-size: 0.75rem;
    }

    .chicken-table img {
        max-width: 30px;
    }
}
