/* CRT Calculator Frontend Styles */

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f6f8fa;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: left;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    max-width: none;
    padding: 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
}

.logo {
    flex-shrink: 0;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.header-text {
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 400;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        position: static;
    }
    
    .header-text {
        text-align: center;
        position: static;
        transform: none;
        left: auto;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .logo-img {
        height: 50px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .header-text {
        left: 60%;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }
}

/* Main Content */
.main {
    padding: 3rem 0;
}

/* Info Section */
.info-section, .calculator-section {
    max-width: 600px;
    margin: 0 auto 32px auto;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-card, .warning-card {
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 24px 0 rgba(60, 72, 88, 0.10), 0 1.5px 4px 0 rgba(60, 72, 88, 0.08);
    border-radius: 15px;
    padding: 2rem 2.2rem;
    border: 1.5px solid #e3e8ee;
}

.info-card h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.warning-card {
    background: #fff;
}

.warning-card h3 {
    color: #e74c3c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.info-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.warning-card p {
    color: #2c3e50;
    line-height: 1.7;
}

/* Calculator Section */
.calculator-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 400;
}

.form-group input {
    padding: 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.help-text {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

.calculate-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result Section */
.result-section, .error-section {
    margin-top: 2rem;
}

.result-card, .error-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.result-card {
    border-left: 4px solid #27ae60;
}

.error-card {
    border-left: 4px solid #e74c3c;
}

.result-card h3 {
    color: #27ae60;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.error-card h3 {
    color: #e74c3c;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}

.result-item.highlight {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-left: 3px solid #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-label {
    font-weight: 500;
}

.result-value {
    font-weight: 600;
    color: #2c3e50;
}

.result-item.highlight .result-value {
    color: white;
}

.summary-section {
    background: #ecf0f1;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 3px solid #95a5a6;
}

.summary-section h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.summary-text {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: rgba(44, 62, 80, 0.9);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer a:hover {
    color: #2ecc71;
}

/* Loading Animation */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .main {
        padding: 2rem 0;
    }
    
    .info-card, .warning-card, .calculator-section {
        padding: 1rem;
    }
}