/* Reset CSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; /* Thoda side space */
}

/* Mobile Container Logic */
.container {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;       /* Mobile par full width */
    max-width: 400px;  /* Tablet/Desktop par jyada na faile */
    text-align: center;
}

h1, h2 {
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 24px;
}

p {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

/* --- GLOBAL INPUT STYLES --- */
/* Note: Ye style sabhi inputs par lagega, lekin Checkbox isse override karega */
input {
    width: 100%;
    padding: 14px; /* Mobile touch ke liye bada padding */
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px; /* Text bada dikhega */
    background: #fafafa;
    outline: none;
}

input:focus {
    border-color: #007bff;
    background: #fff;
}

/* --- TERMS & CONDITIONS SECTION --- */

/* Terms & Conditions Container */
.terms-box {
    display: flex;          /* Ek line mein lane ke liye */
    align-items: center;    /* Upar-niche se center karne ke liye */
    justify-content: flex-start; /* Left side mein rakhne ke liye */
    margin: 15px 0;         /* Thoda gap */
    width: 100%;
}

/* Khas Checkbox ke liye Styling (Override Global Input Styles) */
.terms-box input[type="checkbox"] {
    width: 20px !important;       /* Fix size - Global 100% width ko override kiya */
    height: 20px !important;      /* Fix size */
    margin: 0 10px 0 0 !important; /* Sirf right side me gap, baki 0 */
    padding: 0 !important;        /* Padding hatao */
    display: inline-block;
    cursor: pointer;
    background: white;            /* Background fix */
    flex-shrink: 0;               /* IMPORTANT: Mobile par checkbox pitchke na */
    border: 1px solid #ddd;       /* Border wapis add kiya taki dikhe */
    border-radius: 4px;           /* Thoda square-rounded look */
}

/* Label text styling */
.terms-box label {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    text-align: left; /* Text left side se shuru ho */
    cursor: pointer;  /* Text par click karne se bhi tick ho */
}

.terms-box a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}
.terms-box a:hover {
    text-decoration: underline;
}

/* --- BUTTONS --- */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:active {
    transform: scale(0.98); /* Click effect */
}

.logout-btn {
    background: #ff4757;
}

/* Links (General) */
a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

/* Alerts */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: left;
}
.error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

/* ========================================= */
/*      FULL SCREEN LOADER OVERLAY CSS       */
/* ========================================= */

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95); /* Safed background, thoda transparent */
    z-index: 9999; /* Sabse upar */
    display: none; /* Default mein chhupa rahega (JS se 'flex' karna padega) */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Spinner Animation */
.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff; /* Blue Color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-overlay p {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    margin-bottom: 0; /* Reset global margin if needed */
}