/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,100..700;1,100..700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Kantumruy Pro", sans-serif;
}

body {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Section Container */
section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 650px;
    padding: 40px;
    transition: all 0.3s ease;
}

section:hover {
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

/* Register Container */
.register {
    width: 100%;
}

form {
    width: 100%;
}

/* Title Styles */
.title {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.title p {
    font-size: 25px;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    position: relative;
    display: inline-block;
}


.academic-title {
    margin-top: 30px;
    margin-bottom: 25px;
}

.academic-title u {
    font-size: 22px;
    color: #34495e;
}

/* Input Group Styles */
.input-gr {
    width: 100%;
    margin-bottom: 25px;
    position: relative;
}

.input-gr label {
    font-weight: 500;
    color: #34495e;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.input-gr input,
.input-gr select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #2c3e50;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

.input-gr input:focus,
.input-gr select:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-gr input::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* Radio Button Styles */
.input-radio {
    margin-bottom: 25px;
}

.input-radio label {
    font-weight: 500;
    color: #34495e;
    margin-bottom: 15px;
    display: block;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.radio-options {
    display: flex;
    gap: 30px;
    align-items: center;
}

.radio-gr {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-gr input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
}

.radio-gr label {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    cursor: pointer;
    font-weight: 400;
}

/* Input Row for Year and Note */
.input-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.half-width {
    flex: 1;
    margin-bottom: 0;
}

/* Button Styles */
.btn-button {
    text-align: center;
    margin-top: 40px;
}

button {
    background: linear-gradient(45deg, #667eea, #3a3cc7);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

button:hover {
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}


button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Loading Spinner */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

button.loading .loading-spinner {
    display: block;
}

button.loading .btn-text {
    margin-right: 5px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile-First Responsive Design */

/* Extra Small Devices (Phones, 320px and up) */
@media (max-width: 375px) {
    body {
        padding: 10px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        background-attachment: fixed;
    }
    
    section {
        padding: 20px 15px;
        border-radius: 15px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    
    .title p {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .title p::after {
        width: 60px;
        height: 2px;
    }
    
    .academic-title p {
        font-size: 18px;
        line-height: 1.4;
    }
    
    .input-gr {
        margin-bottom: 20px;
    }
    
    .input-gr label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .input-gr input,
    .input-gr select {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .half-width {
        margin-bottom: 20px;
    }
    
    .radio-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .radio-gr {
        gap: 6px;
    }
    
    .radio-gr input[type="radio"] {
        width: 18px;
        height: 18px;
    }
    
    .radio-gr label {
        font-size: 14px;
    }
    
    button {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 40px;
        margin-top: 25px;
    }
    
    .loading-spinner {
        width: 18px;
        height: 18px;
    }
}

/* Small Devices (Phones, 376px - 480px) */
@media (min-width: 376px) and (max-width: 480px) {
    body {
        padding: 15px;
    }
    
    section {
        padding: 25px 20px;
        border-radius: 18px;
    }
    
    .title p {
        font-size: 22px;
    }
    
    .academic-title p {
        font-size: 19px;
    }
    
    .input-gr input,
    .input-gr select {
        padding: 13px 16px;
        font-size: 15px;
        border-radius: 11px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .half-width {
        margin-bottom: 22px;
    }
    
    .radio-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    
    button {
        width: 100%;
        padding: 16px 25px;
        font-size: 16px;
    }
}

/* Medium Devices (Tablets, 481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        padding: 20px;
    }
    
    section {
        padding: 35px 25px;
        max-width: 550px;
    }
    
    .title p {
        font-size: 26px;
    }
    
    .academic-title p {
        font-size: 21px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .half-width {
        margin-bottom: 25px;
    }
    
    .radio-options {
        flex-direction: row;
        gap: 25px;
    }
    
    button {
        width: 100%;
        padding: 17px 30px;
        font-size: 17px;
    }
}

/* Large Devices (Small Laptops, 769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    section {
        max-width: 600px;
        padding: 40px 35px;
    }
    
    .input-row {
        flex-direction: row;
        gap: 20px;
    }
    
    .half-width {
        margin-bottom: 0;
    }
    
    button {
        width: auto;
        min-width: 220px;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .input-gr input,
    .input-gr select {
        padding: 16px 20px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    button {
        padding: 18px 30px;
        font-size: 18px;
    }
    
    .radio-gr input[type="radio"] {
        width: 22px;
        height: 22px;
    }
    
    /* Better touch targets */
    .radio-gr {
        padding: 5px;
        margin: -5px;
    }
}

/* Landscape Phone Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 15px 5px;
    }
    
    section {
        padding: 25px 30px;
        margin: 10px 0;
    }
    
    .title {
        margin-bottom: 25px;
    }
    
    .academic-title {
        margin-top: 20px;
        margin-bottom: 20px;
    }
    
    .input-gr {
        margin-bottom: 18px;
    }
    
    .input-row {
        flex-direction: row;
        gap: 15px;
    }
    
    .half-width {
        margin-bottom: 18px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    section {
        border: 0.5px solid rgba(255, 255, 255, 0.2);
    }
    
    .input-gr input,
    .input-gr select {
        border-width: 1px;
    }
}

/* Dark Mode Support for Mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    section {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
    
    .title p,
    .academic-title p {
        color: #ecf0f1;
    }
    
    .input-gr label,
    .input-radio label {
        color: #bdc3c7;
    }
    
    .input-gr input,
    .input-gr select {
        background: #34495e;
        border-color: #4a5f7a;
        color: #ecf0f1;
    }
    
    .input-gr input::placeholder {
        color: #7f8c8d;
    }
}

/* Accessibility Improvements for Mobile */
@media (max-width: 768px) {
    /* Larger focus indicators on mobile */
    button:focus,
    .input-gr input:focus,
    .input-gr select:focus,
    .radio-gr input:focus {
        outline: 3px solid #667eea;
        outline-offset: 3px;
    }
    
    /* Better contrast for mobile screens */
    .input-gr input:focus,
    .input-gr select:focus {
        box-shadow: 0 0 0 6px rgba(102, 126, 234, 0.15);
    }
}

/* Additional Enhancements */
.input-gr select option {
    padding: 10px;
    color: #2c3e50;
}

/* Focus states for accessibility */
button:focus,
.input-gr input:focus,
.input-gr select:focus,
.radio-gr input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Success animation */
@keyframes success {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

button.success {
    animation: success 0.6s ease;
}