/* General styles for body and layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('images/background.webp') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header styles */
header {
    background: #4CAF50;
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 5px solid #3e8e41;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 50px auto;
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    text-align: center;
}

/* Navigation styles */
nav {
    margin-top: 10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

nav a {
    display: inline-block;
    padding: 5px 10px;
    margin: 5px;
    color: #4CAF50;
    background-color: white;
    border: 2px solid #4CAF50;
    border-radius: 5px;
    font-size: 0.9em;
    text-decoration: none;
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: #4CAF50;
    color: white;
}

/* Main content area styles */
main {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form and button styles */
h2, h3 {
    font-size: 1.5rem !important;;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

label {
    font-size: 1.1em;
    margin-bottom: 10px;
    display: block;
    color: #333;
}

input[type="file"], button, textarea {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

/* Button hover effects */
button:hover, .clear-button:hover, #copyButton:hover {
    background-color: #003852;
    opacity: 0.8;
}

button:focus, .clear-button:focus, textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Clear button specific style */
.clear-button {
    background-color: #d32f2f;
    color: white;
}

.clear-button:hover {
    background-color: #a71d2a;
}

/* Styling for textareas */
textarea {
    height: 200px;
    resize: vertical;
}

#copyButton {
    background-color: #008CBA;
    width: auto;
    padding: 12px 20px;
    margin-top: 10px;
    display: block;
    font-size: 1.1em;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#copyButton:hover {
    opacity: 0.8;
}

/* Footer styles */
footer {
    text-align: center;
    padding: 15px;
    background: #333;
    color: white;
    margin-top: 40px;
}

/* Specific adjustments for form buttons */
form button {
    background-color: #595959;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    width: 80%;
    padding: 12px;
    font-size: 1.1em;
    display: block;
    margin: 10px auto;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .container {
        max-width: 85%;
    }
    main {
        padding: 20px;
    }
    form button {
        width: 100%;
    }
}

@media (max-width: 768px) {
    nav a {
        font-size: 0.8em;
        padding: 6px 10px; /* Reduced padding */
    }
    body {
        font-size: 0.9rem !important; /* Reduced base font size */
    }
    h2, h3 {
        font-size: 1.3rem !important;
    }
    label, button, textarea, input {
        font-size: 0.9rem;
    }
    textarea {
        height: 140px;
    }
    header {
        padding: 15px 0; /* Reduced padding to avoid excessive header height */
    }
    .container {
        margin: 30px auto; /* Adjusted margin */
    }
}

@media (max-width: 480px) {
    header {
        font-size: 1.2rem !important;
        padding: 12px 0; /* Reduce padding */
    }
    body {
        font-size: 0.85rem !important; /* Further reduce base font size */
    }
    nav {
        flex-direction: column;
    }
    nav a {
        width: 90%; /* Adjust width */
        margin-bottom: 5px;
        font-size: 0.9em;
        padding: 5px 8px;
    }
    h2, h3 {
        font-size: 1.1rem !important;
    }
    textarea {
        height: 120px;
    }
    .container {
        width: 95%;
        margin: 20px auto;
        padding: 15px; /* Reduce padding */
    }
}
