/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(to bottom right, #e8f0fe, #f7f7f7);
    min-height: 100vh;           /* allow content taller than screen */
    display: flex;
    justify-content: center;     /* center horizontally */
    padding: 40px 15px;          /* add breathing room at top/bottom */
    overflow-y: auto;            /* enable scroll if needed */
}

/* Container */
/* Container */
.container {
    background: #ffffff;
    width: 95%;
    max-width: 450px;
    
    /* Limit the height */
    max-height: 80vh;           /* ↓ Reduced height */
    overflow-y: auto;           /* Scroll inside container if needed */

    padding: 20px;              /* ↓ Reduced padding */
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
    animation: fadeIn 0.6s ease-in-out;
}

/* Title */
.container h1 {
    text-align: center;
    margin-bottom: 15px;        /* ↓ Less margin below title */
    font-size: 1.5rem;          /* ↓ Slightly smaller title */
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 6px;
}

/* Form Groups */
.form-group {
    margin-bottom: 12px;        /* ↓ Reduced spacing between fields */
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;          /* ↓ Slightly smaller labels */
    color: #444;
    display: block;
    margin-bottom: 4px;         /* ↓ Less margin below labels */
}

.form-group label span {
    color: red;
}

/* Inputs, textarea, select */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;          /* ↓ Reduced inner padding */
    font-size: 0.9rem;          /* ↓ Slightly smaller font */
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

/* Textarea */
.form-group textarea {
    resize: vertical;
    min-height: 50px;           /* ↓ Reduced min height */
    max-height: 100px;          /* ↓ Prevents very tall textarea */
}

/* Focus Effects */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #007bff;
    background: #fff;
    outline: none;
    box-shadow: 0 0 3px rgba(0,123,255,0.3);
}

/* Button */
.btn-submit {
    width: 100%;
    padding: 10px;              /* ↓ Reduced button height */
    background: #007bff;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 8px;            /* ↓ Reduced top margin */
}

.btn-submit:hover {
    background: #0056b3;
}

/* Message Box */
.message {
    background: #e6ffed;
    border: 1px solid #28a745;
    color: #155724;
    padding: 8px;               /* ↓ Reduced padding */
    margin-bottom: 12px;        /* ↓ Reduced spacing */
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 500px) {
    .container {
        padding: 15px;
        max-height: 85vh;       /* Slightly more height for small screens */
    }

    .container h1 {
        font-size: 1.3rem;
    }
}
