/* SafeCity - Main Stylesheet */

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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

/* Dashboard Styles */
.dashboard {
    text-align: center;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.animated-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.safety-card {
    background: linear-gradient(135deg, #fff 60%, #e0e7ff 100%);
    box-shadow: 0 4px 24px rgba(102,126,234,0.12), 0 1.5px 8px #764ba222;
    border-radius: 18px;
    padding: 2rem 1.5rem;
    min-width: 260px;
    max-width: 320px;
    text-align: center;
    position: relative;
    transition: transform 0.3s cubic-bezier(.77,0,.175,1), box-shadow 0.3s;
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    animation: cardFadeIn 1s cubic-bezier(.77,0,.175,1) forwards;
}
.safety-card.card-1 { animation-delay: 0.2s; }
.safety-card.card-2 { animation-delay: 0.5s; }
.safety-card.card-3 { animation-delay: 0.8s; }
.safety-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 8px 32px #667eea33, 0 2px 12px #764ba244;
}
.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: iconPop 0.7s cubic-bezier(.77,0,.175,1);
}
@keyframes cardFadeIn {
    0% { opacity: 0; transform: translateY(40px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes iconPop {
    0% { transform: scale(0.7); }
    80% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.dashboard-hero {
    position: relative;
    z-index: 2;
}

.dashboard-animated-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(circle at 20% 30%, #667eea55 0%, transparent 60%),
                radial-gradient(circle at 80% 70%, #764ba255 0%, transparent 60%),
                linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
    animation: bgMove 8s linear infinite alternate;
}

@keyframes bgMove {
    0% { background-position: 0% 0%, 100% 100%, 0% 0%; }
    100% { background-position: 100% 100%, 0% 0%, 100% 100%; }
}

.animated-title {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 2px 2px 8px #764ba2cc;
    animation: fadeInDown 1.2s cubic-bezier(.77,0,.175,1) both;
}
.animated-sub {
    font-size: 1.5rem;
    color: #e0e0ff;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1.5s 0.3s cubic-bezier(.77,0,.175,1) both;
}
.animated-sub2 {
    font-size: 1.1rem;
    color: #f8f8ff;
    margin-bottom: 2rem;
    animation: fadeInUp 1.5s 0.6s cubic-bezier(.77,0,.175,1) both;
}
.animated-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}
.pulse {
    animation: pulseBtn 1.5s infinite;
}
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 #667eea44; }
    70% { box-shadow: 0 0 0 10px #667eea00; }
    100% { box-shadow: 0 0 0 0 #667eea00; }
}

.dashboard h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: white;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

/* Form Styles */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

/* Map Styles */
.map-container {
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#map {
    width: 100%;
    height: 100%;
}

/* Safety Zone Styles */
.safety-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.safety-level {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: bold;
    margin: 0.5rem 0;
}

.safety-safe {
    background: #4CAF50;
    color: white;
}

.safety-warning {
    background: #FFC107;
    color: #333;
}

.safety-danger {
    background: #F44336;
    color: white;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

/* Location Button */
.location-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border: none;
    padding: 10px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .dashboard h1 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .form-container {
        padding: 1.5rem;
    }

    .map-container {
        height: 300px;
    }
}

/* Authentication Styles */
.auth-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.auth-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-form h1 {
    text-align: center;
    color: #333;
    margin-bottom: 0.5rem;
}

.auth-form p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    padding: 5px;
}

.form-group {
    position: relative;
}

.password-strength {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.25rem;
    border-radius: 4px;
}

.password-strength.weak {
    background: #ffebee;
    color: #c62828;
}

.password-strength.medium {
    background: #fff3e0;
    color: #ef6c00;
}

.password-strength.strong {
    background: #e8f5e8;
    color: #2e7d32;
}

.password-match {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.25rem;
    border-radius: 4px;
}

.password-match.match {
    background: #e8f5e8;
    color: #2e7d32;
}

.password-match.no-match {
    background: #ffebee;
    color: #c62828;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.checkbox-group {
    margin: 1rem 0;
}

.auth-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.social-login {
    margin-top: 2rem;
    text-align: center;
}

.social-login p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #333;
    font-size: 0.9rem;
}

.social-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.google-btn:hover {
    border-color: #db4437;
    background: #fdf2f2;
}

.facebook-btn:hover {
    border-color: #3b5998;
    background: #f2f4ff;
}

.auth-info {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.benefit-item {
    text-align: center;
    padding: 1rem;
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.benefit-item h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: #666;
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.testimonial {
    margin-top: 2rem;
    text-align: center;
    padding: 1.5rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.testimonial blockquote {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial cite {
    color: #667eea;
    font-weight: 500;
}

/* User Menu Styles */
.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 150px;
    z-index: 1000;
}

.user-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.user-dropdown a:hover {
    background: #f5f5f5;
    color: #667eea;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal-body {
    margin-top: 1rem;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design for Auth Pages */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        flex-direction: column;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

/* User dropdown menu styles */
.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 150px;
    z-index: 1000;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.user-dropdown a:hover {
    background-color: #f5f5f5;
}

/* Responsive adjustments for user menu */
@media (max-width: 768px) {
    .user-dropdown {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 0;
        min-width: auto;
    }
    
    .user-dropdown a {
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
    }
}

/* Login prompt styles */
.login-prompt {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    border: 1px solid #e0e6ed;
}

.login-prompt-content p {
    margin: 0;
    color: #555;
    font-size: 1rem;
}

.login-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-link:hover {
    color: #764af1;
    text-decoration: underline;
}

/* Responsive login prompt */
@media (max-width: 768px) {
    .login-prompt {
        margin-top: 1.5rem;
        padding: 0.8rem;
    }
    
    .login-prompt-content p {
        font-size: 0.9rem;
    }
}
