@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #00A88E;
    --primary-hover: #008f79;
    --bg-dark: #0d0d0d;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #b3b3b3;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: url('../img/ksk-connect-bg.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Fix for Admin Pages (Removes overlay) */
body.admin-page::before {
    display: none;
}

body.admin-page {
    background: #0d0d0d;
    align-items: flex-start;
    display: block;
    overflow-y: auto;
}

.registration-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.banner-section {
    width: 100%;
    height: 330px;
    overflow: hidden;
    position: relative;
}

.banner-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-container {
    padding: 30px 40px 10px;
    text-align: center;
}

.logo-container img {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(0, 168, 142, 0.3));
}

.form-header {
    padding: 20px 40px;
    text-align: center;
}

.form-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #00A88E 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

form {
    padding: 20px 40px 40px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: span 2;
}

label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

input, select, textarea {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    color: white;
    font-size: 16px; /* Prevents auto-zoom on mobile */
    transition: all 0.3s ease;
}

option {
    background-color: #1a1a1a; /* Dark background for dropdown menu */
    color: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 168, 142, 0.1);
    background: rgba(255, 255, 255, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}


/* Focus styles for accessibility */
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Checkbox */
.checkbox-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 35px;
}

.checkbox-group input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.checkbox-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-group label strong {
    color: var(--text-main);
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00A88E 0%, #007a68 100%);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 168, 142, 0.2);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 168, 142, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

/* Mobile Responsiveness Polish */
@media (max-width: 768px) {
    body {
        padding: 0; /* Full width on mobile */
        align-items: flex-start; /* scroll from top */
    }

    .registration-container {
        border-radius: 0; /* Edge to edge */
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.8); /* Denser background for readability */
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .logo-container {
        padding: 20px 20px 0;
    }

    .form-header {
        padding: 15px 20px;
    }

    form {
        padding: 10px 20px 40px;
    }

    .banner-section {
        height: 160px;
    }

    .btn-otp {
        padding: 0 15px;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 16px;
        font-size: 1rem;
        margin-top: 25px;
        border-radius: 12px;
    }

    .checkbox-group label {
        font-size: 0.85rem;
    }
}

/* Utility for extra small screens */
@media (max-width: 480px) {
    .banner-section {
        height: 160px;
    }
    
    .form-header h1 {
        font-size: 1.6rem;
    }
}
