/* Maitry Project - Gujarat Police Feedback System */
/* Mobile-First Responsive Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --secondary-color: #0ea5e9;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --text-dark: #212711;
    --text-light: #6b7280;
    --border-color: #d1d5db;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Noto Sans Gujarati', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #142d4c 0%);
    min-height: 100vh;
    padding: 15px;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 25px 20px;
    text-align: center;
}

.header-logo {
    width: 650px;
    height: 200px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo img {
    max-width: 100%;
    max-height: 100%;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    font-weight: 700;
}

.header p {
    font-size: 14px;
    opacity: 0.95;
}

/* Form Container */
.form-container {
    padding: 25px 20px;
}

.form-title {
    color: var(--primary-color);
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.required {
    color: var(--danger-color);
    margin-left: 3px;
}

/* Input Fields */
.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.3s ease;
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--light-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: #e5e7eb;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-item label {
    cursor: pointer;
    font-size: 14px;
    flex: 1;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

/* Footer */
.footer {
    background: var(--light-color);
    padding: 15px 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading .btn-text {
    display: none;
}

/* Admin Panel Styles */
.admin-header {
    /* background: var(--dark-color); */
    background: #f0d43a;
    /* color: var(--white); */
    color: #142d4c;
    /* background: var(--white);
    color: var(--dark-color); */
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 600;
}

.admin-logo {
    width: 50px;
    height: 32px;
    object-fit: contain;
}

.btn-logout {
    padding: 8px 16px;
    background: var(--danger-color);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-logout:hover {
    background: #dc2626;
    text-decoration: none;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 18px;
    font-weight: bold;
    color: #142d4c;
}

.table-container {
    padding: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

thead {
    background: var(--primary-color);
    color: var(--white);
}

th,
td {
    padding: 12px;
    text-align: left;
    font-size: 14px;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--light-color);
}

/* Login Page */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Mobile Logo Fix */
@media (max-width: 600px) {
    .header-logo {
        width: 300px;
        /* mobile પર readable */
        height: 100px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 300px;
        height: 100px;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    body {
        padding: 30px;
    }

    .container {
        max-width: 700px;
    }

    .header h1 {
        font-size: 28px;
    }

    .form-container {
        padding: 35px 30px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }

    .table-container {
        padding: 30px;
    }
}

/* extra css*/

.google-login-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    text-align: center;
    border: 2px dashed #667eea;
}

.google-login-text {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
}

.user-info {
    display: none;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.user-info.visible {
    display: flex;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.user-details {
    flex: 1;
    text-align: left;
}

.user-name {
    font-weight: 600;
    color: #333;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.optional-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.email-locked {
    display: flex;
    align-items: center;
    gap: 10px;
}

.email-locked-icon {
    color: #10b981;
    font-size: 20px;
}

/* ✅ Loading Screen Animation - style.css ના અંતે add કરો */

#loadingScreen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #1e1b4b, #020617);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loadingScreen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-wrapper {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Rotating Gradient Circle */
.cosmic-circle {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: conic-gradient(
        #22d3ee,
        #6366f1,
        #a855f7,
        #ec4899,
        #22d3ee
    );
    animation: spin 5s linear infinite;
    filter: blur(1px);
}

.cosmic-circle::after {
    content: '';
    position: absolute;
    inset: 12px;
    background: #f3f4f5ff;
    border-radius: 50%;
}

/* Logo */
.loader-logo {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 20px;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

/* Stars */
.stars span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: starFloat 3s infinite ease-in-out;
    opacity: 0.8;
}

.stars span:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.stars span:nth-child(2) {
    top: 30%;
    left: 80%;
    animation-delay: 0.5s;
}

.stars span:nth-child(3) {
    top: 70%;
    left: 15%;
    animation-delay: 1s;
}

.stars span:nth-child(4) {
    top: 85%;
    left: 60%;
    animation-delay: 1.5s;
}

.stars span:nth-child(5) {
    top: 20%;
    left: 50%;
    animation-delay: 2s;
}

.stars span:nth-child(6) {
    top: 60%;
    left: 90%;
    animation-delay: 2.5s;
}

.stars span:nth-child(7) {
    top: 45%;
    left: 5%;
    animation-delay: 1.2s;
}

.stars span:nth-child(8) {
    top: 75%;
    left: 40%;
    animation-delay: 0.8s;
}

/* Main Content - શરૂઆતમાં hidden */
#mainContent {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in, visibility 0.8s ease-in;
}

#mainContent.visible {
    opacity: 1;
    visibility: visible; 
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

@keyframes starFloat {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-12px);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .loader-wrapper {
        width: 280px;
        height: 280px;
    }

    .cosmic-circle {
        width: 250px;
        height: 250px;
    }

    .loader-logo {
        width: 220px;
        height: 220px;
    }
}
