/* Premium Color Palette */
:root {
    --primary-color: #007bff; /* A vibrant blue */
    --secondary-color: #6c757d; /* A muted grey */
    --accent-color: #28a745; /* A success green */
    --background-color: #f8f9fa; /* Light grey background */
    --card-background: #ffffff; /* White card background */
    --text-color: #343a40; /* Dark grey text */
    --border-color: #dee2e6; /* Light grey border */
}

/* Basic Reset and Body Styling */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 15px; /* Add some horizontal padding */
}

/* Header Styling */
header {
    background: var(--card-background);
    color: var(--text-color);
    padding: 20px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.site-title {
    margin: 0;
    font-size: 2em;
    font-weight: 700;
    color: var(--primary-color);
}

header nav ul {
    padding: 0;
    list-style: none;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center nav items on smaller screens */
}

header nav ul li {
    margin-left: 20px;
}

header nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1em;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--primary-color);
}

/* Main Content Styling */
main {
    padding: 30px 0;
    min-height: 500px;
}

.section-title {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 700;
}

/* Card Styling for Containers */
.card {
    background: var(--card-background);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* Tool Container Styling */
.tool-container {
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--border-color);
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #f8f9fa; /* Slightly different background for upload area */
    transition: border-color 0.3s ease;
}

.upload-area.drag-over {
    border-color: var(--primary-color);
}

.file-input {
    display: none; /* Hide the default file input */
}

.upload-button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.upload-button:hover {
    background: darken(var(--primary-color), 10%); /* Darken on hover */
}

.upload-text {
    margin-top: 10px;
    color: var(--secondary-color);
}


.image-preview-area {
    margin-top: 20px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: #e9ecef; /* Light grey background for preview */
    border-radius: 8px;
}

.image-canvas {
    max-width: 100%;
    max-height: 500px;
    display: none;
    border-radius: 8px; /* Rounded corners for canvas */
}

.placeholder-text {
    color: var(--secondary-color);
    font-size: 1.2em;
}

.resize-controls {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Increased gap */
}

.input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-group label {
    font-weight: 700;
    color: var(--text-color);
}

.input-field {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100px; /* Adjust width as needed */
    font-size: 1em;
}

/* Button Styling */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    text-decoration: none; /* For link buttons */
    display: inline-block; /* For link buttons */
    text-align: center;
}

.primary-btn {
    background: var(--primary-color);
    color: #fff;
}

.primary-btn:hover {
    background: darken(var(--primary-color), 10%);
}

.secondary-btn {
    background: var(--secondary-color);
    color: #fff;
}

.secondary-btn:hover {
    background: darken(var(--secondary-color), 10%);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.link-btn {
    background: var(--accent-color);
    color: #fff;
}

.link-btn:hover {
    background: darken(var(--accent-color), 10%);
}


/* Service Links Styling */
.service-links {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Gap between service buttons */
}


/* Article, Privacy, Terms Sections */
.content-section {
    /* Card styling is applied via .card class */
}

.article-item, .policy-item, .terms-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.article-item:last-child, .policy-item:last-child, .terms-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-item h3, .policy-item h3, .terms-item h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5em;
}

/* Contact Form Styling */
.contact-form {
    max-width: 700px; /* Slightly wider form */
    margin: 20px auto;
    /* Card styling is applied via .card class */
}

.form-group {
    margin-bottom: 20px; /* Increased margin */
}

.form-group label {
    display: block;
    margin-bottom: 8px; /* Increased margin */
    font-weight: 700;
    color: var(--text-color);
}

.input-field {
    width: 100%;
    padding: 12px; /* Increased padding */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
}

textarea.input-field {
    resize: vertical; /* Allow vertical resizing */
}


.contact-info {
    text-align: center;
    margin-bottom: 30px; /* Increased margin */
    font-size: 1.2em;
    color: var(--text-color);
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
    color: darken(var(--primary-color), 10%);
}


/* Footer Styling */
footer {
    background: var(--text-color); /* Dark background for footer */
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px; /* Increased margin top */
}

/* Responsive Design */
@media(max-width: 768px){
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        margin-top: 15px;
    }

    header nav ul li {
        margin: 0 10px; /* Adjust spacing */
    }

    .site-title {
        font-size: 1.8em;
    }

    .section-title {
        font-size: 1.8em;
    }

    .resize-controls {
        flex-direction: column;
        gap: 15px;
    }

    .input-group {
        flex-direction: column;
        align-items: flex-start;
        width: 100%; /* Full width for input groups */
    }

    .input-group label {
        margin-bottom: 5px;
    }

    .input-field {
        width: 100%; /* Full width on small screens */
        text-align: left;
    }

    .btn {
        width: 100%; /* Full width buttons */
        margin-bottom: 10px; /* Add space between buttons */
    }

    .service-links {
        flex-direction: column;
        gap: 15px;
    }

    .service-links .btn {
         margin: 0 auto; /* Center buttons */
    }

    .card {
        padding: 20px; /* Reduced padding on smaller screens */
    }

    .upload-area {
        padding: 20px;
    }
}
