/* Base CSS - Main application styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent; /* Remove blue highlight on mobile */
}

/* Prevent zoom on input focus on iOS */
input, select, textarea {
    font-size: 16px;
}

/* Navigation styles */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    color: #ecf0f1;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-links a:hover {
    background-color: #34495e;
}

/* Notification badge */
.notification-badge {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
    vertical-align: top;
    min-width: 18px;
    text-align: center;
}

.nav-links li {
    position: relative;
}

/* Layout containers */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

/* Alert messages */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

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

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

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

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

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

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    min-height: 44px; /* Touch-friendly minimum */
    min-width: 44px;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Error messages */
.error-messages {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* User info grid */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.info-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}

.info-value {
    color: #333;
    font-size: 1.1em;
}

/* Typography */
h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

/* Welcome message */
.welcome-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
}

/* Mobile menu button (hidden by default) */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: #ecf0f1;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.mobile-menu-btn.active .hamburger:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-btn.active .hamburger:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-container {
        padding: 0 15px;
        position: relative;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #2c3e50;
        flex-direction: column;
        padding: 20px 0;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px;
        width: 100%;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links a:hover {
        background-color: #34495e;
    }
    
    /* Container and layout */
    .container {
        margin: 20px auto;
        padding: 0 15px;
        max-width: 100%;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    /* Welcome message */
    .welcome-message {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .welcome-message h1 {
        font-size: 1.8rem;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Text */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
}

@media screen and (max-width: 480px) {
    /* Extra small screens */
    .nav-container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .container {
        padding: 0 10px;
        margin: 15px auto;
    }
    
    .card {
        padding: 15px;
    }
    
    .welcome-message {
        padding: 15px 10px;
    }
    
    .welcome-message h1 {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .nav-links {
        max-height: calc(100vh - 60px);
        top: 60px;
    }
    
    .nav-links a {
        padding: 10px 20px;
    }
    
    .welcome-message {
        padding: 15px;
    }
}

/* Footer styles */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    border-top: 3px solid #3498db;
}

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

.site-footer p {
    margin: 0.5rem 0;
}

.site-footer a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #5dade2;
    text-decoration: underline;
}

.footer-links {
    font-size: 0.9rem;
    margin-top: 1rem;
}

.footer-links a {
    margin: 0 0.5rem;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .footer-links a {
        display: inline-block;
        margin: 0.3rem 0.3rem;
    }
}