/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    position: relative;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 80px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px 30px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.header h1 {
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header p {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 500;
}

/* Progress Bar */
.progress-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, #f8f9fa, #e9ecef);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 5px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.05em;
}

/* Form Card */
.form-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
}

.section-title {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: 700;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
    padding-bottom: 15px;
    letter-spacing: -0.3px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Question Styles */
.question {
    margin-bottom: 35px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    border-left: 5px solid transparent;
    border-image: linear-gradient(135deg, #667eea, #764ba2) 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.question:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.1em;
    line-height: 1.6;
}

.question-note {
    font-style: italic;
    color: #6c757d;
    font-size: 0.95em;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* Radio Options */
.radio-options {
    display: grid;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 15px 18px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.radio-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.6s;
}

.radio-option:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.radio-option:hover::before {
    left: 100%;
}

.radio-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.radio-option input[type="radio"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.radio-option.selected input[type="radio"] {
    accent-color: white;
}

.radio-option input[type="checkbox"] {
    margin-right: 15px;
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 1em;
}

/* Buttons */
.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    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.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 35px;
    flex-wrap: wrap;
}

/* Scale Rating */
.scale-container {
    text-align: center;
    padding: 35px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 15px;
    margin: 25px 0;
    border: 2px dashed #dee2e6;
    position: relative;
}

.scale-container::before {
    content: '📊';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5em;
    opacity: 0.3;
}

.scale-line {
    position: relative;
    height: 6px;
    background: linear-gradient(90deg, #e74c3c 0%, #f39c12 25%, #f1c40f 50%, #2ecc71 75%, #27ae60 100%);
    border-radius: 3px;
    margin: 25px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scale-line::before,
.scale-line::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 4px;
    height: 22px;
    background: #6c757d;
    border-radius: 2px;
}

.scale-line::before {
    left: 0;
}

.scale-line::after {
    right: 0;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.95em;
    margin-bottom: 10px;
}

.scale-input {
    width: 120px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 700;
    margin: 15px auto;
    display: block;
    padding: 12px;
    border: 3px solid #dee2e6;
    border-radius: 12px;
    background: white;
    color: #667eea;
    transition: all 0.3s ease;
}

.scale-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
    transform: scale(1.05);
}

/* Admin Dashboard Styles */
.admin-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.admin-header h1 {
    margin: 0;
    font-size: 24px;
}

.logout-btn {
    background: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: 600;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.table-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filters select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background: white;
}

.filters select:focus {
    outline: none;
    border-color: #667eea;
}

/* Table Styles */
#respondents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

#respondents-table th {
    background: #f8f9fa;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
}

#respondents-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

#respondents-table tbody tr:hover {
    background: #f8f9fa;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.95) 0%, rgba(52, 73, 94, 0.95) 100%);
    backdrop-filter: blur(15px);
    padding: 15px 0;
    text-align: center;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Admin Link Styling */
.admin-link-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 25px;
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.admin-link:hover {
    color: white;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #c3e6cb;
    margin-bottom: 20px;
    text-align: center;
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    text-align: center;
}

/* Message styling */
.message {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 5px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        padding-bottom: 80px;
    }
    
    .admin-dashboard {
        padding: 10px;
    }
    
    .header {
        padding: 20px 15px;
        border-radius: 15px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.6em;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .header p {
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .progress-container {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 15px;
    }
    
    .progress-text {
        font-size: 0.9em;
    }
    
    .form-card {
        padding: 20px 15px;
        border-radius: 15px;
        margin-bottom: 15px;
    }
    
    .section-title {
        font-size: 1.4em;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .question {
        padding: 15px 12px;
        margin-bottom: 20px;
    }
    
    .question-text {
        font-size: 0.95em;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    .question-note {
        font-size: 0.85em;
        margin-bottom: 15px;
        padding: 10px 12px;
    }
    
    .radio-option {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }
    
    .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 1em;
    }
    
    .scale-container {
        padding: 20px 15px;
    }
    
    .scale-labels {
        font-size: 0.8em;
        flex-direction: column;
        gap: 5px;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .scale-input {
        width: 100px;
        font-size: 1.2em;
    }
    
    .admin-link-container {
        margin-top: 20px;
        margin-bottom: 15px;
    }
    
    .admin-link {
        font-size: 0.9em;
        padding: 10px 16px;
    }
    
    .footer {
        font-size: 0.8em;
        padding: 12px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters select, .filters button {
        width: 100%;
    }
    
    #respondents-table {
        font-size: 12px;
    }
    
    #respondents-table th,
    #respondents-table td {
        padding: 6px 4px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
        padding-bottom: 80px;
    }
    
    .header {
        padding: 15px 12px;
        margin-bottom: 12px;
    }
    
    .header h1 {
        font-size: 1.4em;
        margin-bottom: 6px;
    }
    
    .header p {
        font-size: 0.85em;
    }
    
    .progress-container {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .form-card {
        padding: 15px 12px;
        margin-bottom: 12px;
    }
    
    .section-title {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .question {
        padding: 12px 10px;
        margin-bottom: 15px;
    }
    
    .question-text {
        font-size: 0.9em;
        margin-bottom: 12px;
    }
    
    .question-note {
        font-size: 0.8em;
        margin-bottom: 12px;
        padding: 8px 10px;
    }
    
    .radio-option {
        padding: 8px 10px;
        font-size: 0.85em;
    }
    
    .scale-container {
        padding: 15px 10px;
    }
    
    .btn {
        padding: 12px 14px;
        font-size: 0.95em;
    }
    
    .btn-group {
        margin-top: 20px;
        gap: 10px;
    }
    
    .admin-link {
        font-size: 0.85em;
        padding: 8px 14px;
    }
    
    .footer {
        font-size: 0.75em;
        padding: 10px 0;
    }
}