/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 300;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
}

/* Admin button in header */
.header-admin-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.header-admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Container styles */
.container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-container {
    padding: 40px;
}

/* Form styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* Radio button styles */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.radio-label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
    color: #495057;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

/* Message styles */
.success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    border-left: 5px solid #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    border-left: 5px solid #dc3545;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
}

/* Anonymous note */
.anonymous-note {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border-left: 5px solid #17a2b8;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.1);
}

/* Navigation and action buttons */
.navigation {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.action-buttons {
    text-align: center;
    margin-top: 30px;
}

.action-buttons .btn {
    margin: 0 8px;
    padding: 12px 25px;
}

/* Admin specific styles */
.admin-container {
    max-width: 1200px;
    margin: 30px auto;
}

.filters {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.filters form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    margin-right: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    width: 100%;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* Filter buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-filter {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-clear {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
    color: white;
}

/* Table styles */
.complaints-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

th {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #e3f2fd;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Badge styles */
.anonymous-badge {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

/* Login page styles */
.login-container {
    max-width: 450px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 300;
    font-size: 2em;
}

.back-btn {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #764ba2;
    text-decoration: none;
    transform: translateX(-5px);
}

/* CSV viewer styles */
.csv-container {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 1200px;
}

.csv-container h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

pre {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid #e9ecef;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

/* Login info box */
.login-info {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    font-size: 13px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        border-radius: 10px;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .admin-container {
        margin: 15px;
    }
    
    .filters form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-top: 10px;
    }
    
    .header-admin-btn {
        position: relative;
        top: auto;
        right: auto;
        display: inline-block;
        margin-top: 15px;
    }
    
    .action-buttons .btn {
        display: block;
        margin: 10px 0;
        width: 100%;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .header p {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px;
    }
    
    .login-container {
        margin: 50px 15px;
        padding: 25px;
    }
    
    .filters {
        padding: 20px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}