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

body {
    font-family: 'Courier New', monospace;
    background: #000000;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(26, 26, 26, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 0, 0, 0.2);
}

.header {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: #000000;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: none;
}

.intro-section {
    padding: 30px 40px;
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.intro-section h2 {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-size: 1.4rem;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.intro-section h3 {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.intro-section p,
.intro-section li {
    color: #e8e8e8;
    line-height: 1.6;
    margin-bottom: 15px;
}

.intro-section ul,
.intro-section ol {
    padding-left: 20px;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group label {
    font-weight: 600;
    color: #ff6b6b;
    font-size: 0.95rem;
    text-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
    display: block;
    margin-bottom: 8px;
}

.input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-container input,
.input-container select {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid rgba(139, 0, 0, 0.4);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(26, 26, 26, 0.9);
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
}

.input-container input:focus,
.input-container select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
    background: rgba(30, 30, 30, 0.95);
}

.unit {
    color: #cccccc;
    font-weight: 500;
    min-width: 60px;
    font-family: 'Courier New', monospace;
}

.results-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(139, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.results-title {
    font-size: 1.5rem;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.result-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.25);
    border-left: 4px solid #ff6b6b;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(139, 0, 0, 0.35);
    border-color: rgba(255, 107, 107, 0.5);
}

.result-label {
    font-size: 0.85rem;
    color: #cccccc;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff6b6b;
    text-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
}

.visual-section {
    grid-column: 1 / -1;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(139, 0, 0, 0.2);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.visual-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #ff6b6b;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.dof-visualization {
    width: 100%;
    height: 150px;
    background: linear-gradient(to right, #1a1a1a, #333333, #0a0a0a, #333333, #1a1a1a);
    border: 2px solid rgba(139, 0, 0, 0.3);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.indicator {
    position: absolute;
    width: 3px;
    height: 100%;
    transform-origin: center;
}

.indicator.near {
    background: #feca57;
    box-shadow: 0 0 10px rgba(254, 202, 87, 0.5);
}

.indicator.focus {
    background: #ff6b6b;
    width: 4px;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.7);
}

.indicator.far {
    background: #feca57;
    box-shadow: 0 0 10px rgba(254, 202, 87, 0.5);
}

.indicator.hyperfocal {
    background: #e8e8e8;
    width: 4px;
    box-shadow: 0 0 10px rgba(232, 232, 232, 0.5);
}

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.info-text {
    text-align: center;
    color: #cccccc;
    margin-top: 15px;
    line-height: 1.4;
}

.camera-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.preset-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.9), rgba(20, 20, 20, 0.9));
    border: 2px solid rgba(139, 0, 0, 0.4);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #e0e0e0;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.1), transparent);
    transition: left 0.5s ease;
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn:hover {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.25), rgba(255, 107, 107, 0.15));
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.25);
    text-shadow: 0 0 4px rgba(255, 107, 107, 0.4);
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px;
    }

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

    .input-container {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .intro-section {
        padding: 20px;
    }

    .camera-presets {
        flex-direction: column;
    }
}

/* Smooth animations */
.container {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.5), rgba(255, 107, 107, 0.3));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.7), rgba(254, 202, 87, 0.5));
}
