/* style.css */
body {
    font-family: Arial, sans-serif;
    background-color: #e8f5e9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

header {
    text-align: center;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

header h1 {
    color: #4CAF50;
}

nav {
    margin-top: 10px;
}

nav a, nav span {
    margin: 0 10px;
    color: #4CAF50;
    text-decoration: none;
}

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

main {
    padding: 20px;
}

h2, h1 {
    color: #4CAF50;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table th {
    background-color: #4CAF50;
    color: white;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="email"], input[type="password"], textarea, select {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%; /* Full width for better mobile input */
    box-sizing: border-box;
}

button {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.error {
    color: red;
    text-align: center;
    margin-bottom: 15px;
}

.post {
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.post header {
    font-weight: bold;
    margin-bottom: 10px;
    border: none;
    padding: 0;
}

footer {
    text-align: center;
    margin-top: 20px;
    border-top: 2px solid #4CAF50;
    padding-top: 10px;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Responsive styles - more compact */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        border-radius: 0; /* Remove rounding on small screens */
        box-shadow: none; /* Remove shadow for compactness */
    }

    header {
        padding-bottom: 5px;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 1.5em; /* Smaller header */
    }

    nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
    }

    nav a, nav span {
        margin: 2px 0; /* Tighter spacing */
        font-size: 0.9em;
    }

    main {
        padding: 10px;
    }

    h2 {
        font-size: 1.2em;
        margin-bottom: 5px;
    }

    p, ul, li {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    table {
        border: 0;
    }

    table thead {
        display: none; /* Hide headers on mobile */
    }

    table tr {
        margin-bottom: 5px; /* Tighter */
        display: block;
        border: 1px solid #ddd;
    }

    table td {
        display: block;
        text-align: right;
        font-size: 0.85em; /* Smaller text */
        border-bottom: 1px dotted #ccc;
        position: relative;
        padding: 5px 0 5px 40%; /* Compact padding, adjust for label */
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 40%; /* Smaller label width for compactness */
        padding-left: 5px;
        font-weight: bold;
        text-align: left;
        font-size: 0.85em;
    }

    table td:last-child {
        border-bottom: 0;
    }

    form {
        max-width: 100%;
    }

    label {
        margin-bottom: 2px; /* Tighter */
        font-size: 0.9em;
    }

    input[type="text"], input[type="email"], input[type="password"], textarea, select {
        padding: 8px; /* Smaller padding */
        margin-bottom: 10px; /* Tighter */
        font-size: 0.9em;
    }

    button {
        padding: 8px;
        font-size: 0.9em;
    }

    .post {
        padding: 10px;
        margin-bottom: 10px;
    }

    .post header {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .post p {
        font-size: 0.85em;
    }

    footer {
        margin-top: 10px;
        padding-top: 5px;
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }

    h2 {
        font-size: 1em;
    }

    nav a, nav span {
        font-size: 0.85em;
    }

    input[type="text"], input[type="email"], input[type="password"], textarea, select {
        font-size: 0.85em;
        padding: 6px;
    }

    button {
        font-size: 0.85em;
        padding: 6px;
    }

    table td {
        font-size: 0.8em;
        padding: 4px 0 4px 35%;
    }

    table td::before {
        width: 35%;
        font-size: 0.8em;
    }

    .post {
        padding: 8px;
        margin-bottom: 8px;
    }

    .post header {
        font-size: 0.85em;
    }

    .post p {
        font-size: 0.8em;
    }
}