/* ========================================
   Projection Calculator - Styles
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: #fafafa;
    min-height: 100vh;
    color: #1a1a1a;
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* Header */
.header {
    background: white;
    padding: 60px 40px 40px;
    border-bottom: 1px solid #e8e8e8;
}

.header h1 {
    font-size: 4rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.header p {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    max-width: 600px;
}

/* Content Layout */
.content {
    display: grid;
    grid-template-columns: 400px 1fr;
    min-height: calc(100vh - 200px);
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 40px;
    border-right: 1px solid #e8e8e8;
}

.sidebar h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 32px;
    letter-spacing: -0.01em;
}

/* Main Content */
.main-content {
    padding: 40px;
    background: white;
}

/* Input Groups */
.input-group {
    margin-bottom: 32px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: #1a1a1a;
    font-family: inherit;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #76c411;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Custom Resolution */
.custom-resolution {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: #76c411;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 24px;
    font-family: inherit;
}

.calculate-btn:hover {
    background: #76c411;
    transform: translateY(-1px);
}

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

/* Results Section */
.results {
    display: none;
}

.results-header {
    margin-bottom: 40px;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 48px;
}

.metric-card {
    background: white;
    padding: 32px 24px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.metric-card:hover {
    background: #f8f9fa;
}

.metric-card:first-child {
    border-radius: 12px 0 0 12px;
}

.metric-card:last-child {
    border-radius: 0 12px 12px 0;
}

.metric-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 300;
    color: #1a1a1a;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.metric-delta {
    font-size: 0.9rem;
    color: #999;
    font-weight: 400;
}

/* Info Section */
.info-section {
    margin-bottom: 48px;
}

.info-section h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.info-box {
    padding: 0;
}

.info-box h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.info-content {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    color: #666;
    font-weight: 500;
}

.info-value {
    color: #1a1a1a;
    font-weight: 600;
}

.info-unit {
    color: #999;
    font-weight: 400;
}

/* Diagram Section */
.diagram-section {
    margin-bottom: 48px;
}

.diagram-section h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.diagram-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 1px solid #e8e8e8;
}

.projection-diagram {
    margin: 20px auto;
    border: 2px solid #4f830c;
    background: rgba(0, 122, 255, 0.05);
    position: relative;
    display: inline-block;
    border-radius: 4px;
}

.dimension-label {
    position: absolute;
    font-weight: 500;
    color: #76c411;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}

.width-label {
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
}

.height-label {
    left: -50px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
}

/* Formulas Section */
.formulas-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #e8e8e8;
}

.formulas-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.formula {
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
    font-size: 0.9rem;
    color: #333;
}

.formula:last-child {
    margin-bottom: 0;
}

.conversion-note {
    margin-top: 16px;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card:first-child {
        border-radius: 12px 12px 0 0;
    }

    .metric-card:last-child {
        border-radius: 0 0 12px 12px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 3rem;
    }

    .results-header h2 {
        font-size: 2rem;
    }

    .header {
        padding: 40px 20px 30px;
    }

    .sidebar,
    .main-content {
        padding: 30px 20px;
    }
}