/* Root variables for consistent color usage */
:root {
    --primary-color: #713f3f; /* Deep red-brown for headers and buttons */
    --accent-color: #f39c12; /* Vibrant orange for highlights and CTAs */
    --background-color: #ffffff; /* White for clean backgrounds */
    --text-color: #333333; /* Dark gray for readable text */
}

/* General body styling */
body {
    background: url('https://img.freepik.com/premium-photo/graduation-hat-diploma-orange-background_185193-157275.jpg');
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-repeat:no-repeat;
    background-size:cover;
}

/* Header styling */
header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    text-align: center;
}

/* Button styling */
button, .bg-blue-600 {
    background-color: var(--primary-color) !important;
    color: var(--background-color) !important;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover, .bg-blue-600:hover {
    background-color: var(--accent-color) !important;
    transform: scale(1.05);
}

/* Form container */
.max-w-md {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Form inputs and selects */
input, select {
    border: 1px solid #d1d5db !important;
    border-radius: 0.375rem;
    padding: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    border-color: var(--accent-color) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.2);
}

/* Success popup */
#successPopup .bg-white {
    max-width: 90%;
    width: 500px;
    padding: 2rem;
    border-radius: 0.75rem;
    background: var(--background-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transition: transform 0.5s ease;
}

#successPopup .bg-white.scale-100 {
    transform: scale(1);
}

#successPopup h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
}

#successPopup p {
    color: var(--text-color);
    font-size: 1.1rem;
}

/* Indian/Non-Indian toggle buttons */
#indianBtn, #nonIndianBtn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#indianBtn.bg-blue-600, #nonIndianBtn.bg-blue-600 {
    background-color: var(--primary-color) !important;
}

#indianBtn.bg-gray-300, #nonIndianBtn.bg-gray-300 {
    background-color: #e5e7eb !important;
    color: var(--text-color) !important;
}

/* Admin dashboard table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background-color);
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background-color: var(--primary-color);
    color: var(--background-color);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f9fafb;
}

tr:hover {
    background-color: rgba(243, 156, 18, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .max-w-md {
        padding: 1.5rem;
    }

    button, .bg-blue-600 {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #successPopup .bg-white {
        width: 95%;
        padding: 1.5rem;
    }

    #successPopup h2 {
        font-size: 1.5rem;
    }

    #successPopup p {
        font-size: 1rem;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .max-w-md {
        padding: 1rem;
    }

    button, .bg-blue-600 {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    input, select {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    #successPopup .bg-white {
        width: 98%;
        padding: 1rem;
    }

    #successPopup h2 {
        font-size: 1.2rem;
    }

    #successPopup p {
        font-size: 0.9rem;
    }

    /* Stack table cells for small screens */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    thead {
        display: none;
    }

    tr {
        display: block;
        margin-bottom: 1rem;
    }

    td {
        display: block;
        text-align: right;
        position: relative;
        padding-left: 50%;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.5rem;
        width: 45%;
        font-weight: bold;
        color: var(--primary-color);
    }
}