/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Night Mode Toggle Button - Fixed Position */
.night-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(102, 126, 234, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.night-mode-toggle:hover {
    background: rgba(102, 126, 234, 1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
main {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.02) 0%, rgba(118, 75, 162, 0.02) 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-group:focus-within {
    border-color: rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group:focus-within::before {
    opacity: 1;
}

label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #555;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.form-group:focus-within label::after {
    width: 30px;
}

input[type="number"], input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

input[type="number"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

input[type="number"]:hover, input[type="text"]:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.9);
}

/* Bubble Select Styles */
.bubble-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.bubble-select input[type="radio"] {
    display: none;
}

.bubble-option {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.bubble-option:hover {
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.bubble-select input[type="radio"]:checked + .bubble-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bubble-select input[type="radio"]:checked + .bubble-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* Button Styles */
button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

/* Result Styles */
.result {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
    transition: all 0.3s ease;
}

.result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Color-coded result boxes */
.result.excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-color: #10b981;
    border-left: 4px solid #10b981;
}

.result.good {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-color: #10b981;
    border-left: 4px solid #10b981;
}

.result.fair {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.result.poor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: #ef4444;
    border-left: 4px solid #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Evaluation Styles */
.evaluation {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

/* Remove evaluation background when inside color-coded result boxes */
.result.excellent .evaluation,
.result.good .evaluation,
.result.fair .evaluation,
.result.poor .evaluation {
    background: transparent;
    border: none;
    border-left: none;
    padding: 0;
    margin-top: 1rem;
}

.evaluation-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.evaluation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.evaluation-icon {
    font-size: 1.5rem;
}

.evaluation-rating {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evaluation-message {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    line-height: 1.5;
}

.evaluation-tips {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    padding: 0.75rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

/* Adjust tips styling for color-coded result boxes */
.result.excellent .evaluation-tips,
.result.good .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

.result.fair .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

.result.poor .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

.evaluation-benchmark {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.evaluation-benchmark small {
    color: #888;
    font-size: 0.8rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: #666;
    border-top: 1px solid #e1e5e9;
}

footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

footer a:hover {
    color: #5a67d8;
    border-bottom-color: #667eea;
    text-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

body.dark-mode main {
    background: #2d3748;
    color: #e0e0e0;
    border: 1px solid #4a5568;
}

body.dark-mode .form-group {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .form-group:focus-within {
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

body.dark-mode .form-group label {
    color: #cbd5e0;
}

body.dark-mode input[type="number"], 
body.dark-mode input[type="text"] {
    background: rgba(74, 85, 104, 0.8);
    border-color: #718096;
    color: #e0e0e0;
    backdrop-filter: blur(10px);
}

body.dark-mode input[type="number"]:focus, 
body.dark-mode input[type="text"]:focus {
    border-color: #667eea;
    background: rgba(74, 85, 104, 0.95);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

body.dark-mode input[type="number"]:hover, 
body.dark-mode input[type="text"]:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(74, 85, 104, 0.9);
}

body.dark-mode .bubble-option {
    background: rgba(45, 55, 72, 0.9);
    border-color: #4a5568;
    color: #e2e8f0;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark-mode .bubble-option:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(45, 55, 72, 1);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

body.dark-mode .bubble-select input[type="radio"]:checked + .bubble-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

body.dark-mode .bubble-select input[type="radio"]:checked + .bubble-option:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
    transform: translateY(-2px);
}

body.dark-mode .result {
    background: #4a5568;
    border-color: #718096;
    color: #e0e0e0;
}

body.dark-mode .result.excellent {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: #10b981;
    border-left-color: #10b981;
}

body.dark-mode .result.good {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.12) 100%);
    border-color: #10b981;
    border-left-color: #10b981;
}

body.dark-mode .result.fair {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: #f59e0b;
    border-left-color: #f59e0b;
}

body.dark-mode .result.poor {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: #ef4444;
    border-left-color: #ef4444;
}

body.dark-mode .evaluation {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
}

body.dark-mode .result.excellent .evaluation,
body.dark-mode .result.good .evaluation,
body.dark-mode .result.fair .evaluation,
body.dark-mode .result.poor .evaluation {
    background: transparent;
    border: none;
    border-left: none;
}

body.dark-mode .evaluation-message {
    color: #cbd5e0;
}

body.dark-mode .evaluation-tips {
    color: #a0aec0;
    background: rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
}

body.dark-mode .result.excellent .evaluation-tips,
body.dark-mode .result.good .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

body.dark-mode .result.fair .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

body.dark-mode .result.poor .evaluation-tips {
    background: #3b82f6;
    border-left-color: #1d4ed8;
    color: white;
}

body.dark-mode .evaluation-benchmark {
    border-top-color: rgba(102, 126, 234, 0.2);
}

body.dark-mode .evaluation-benchmark small {
    color: #a0aec0;
}

body.dark-mode footer {
    color: #a0aec0;
    border-top-color: #4a5568;
}

body.dark-mode footer a {
    color: #90cdf4;
    border-bottom: 2px solid transparent;
}

body.dark-mode footer a:hover {
    color: #63b3ed;
    border-bottom-color: #90cdf4;
    text-shadow: 0 0 8px rgba(144, 205, 244, 0.4);
}

body.dark-mode .night-mode-toggle {
    background: rgba(45, 55, 72, 0.9);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .night-mode-toggle:hover {
    background: rgba(45, 55, 72, 1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Smooth transitions for all elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .night-mode-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .toggle-icon {
        font-size: 1rem;
    }
    
    .bubble-select {
        gap: 0.5rem;
    }
    
    .bubble-option {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
}
