body {
    font-family: Arial, sans-serif;
    max-width: 900px;
    margin: 50px auto;
    padding: 20px;
    background-color: #000000;
}

.calculator {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-top: 20px;
}

.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
    align-items: center;
}

.theme-toggle-btn {
    padding: 8px 10px;
    cursor: pointer;
    border: 2px solid #000000;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #000000;
    color: white;
    font-size: 18px;
    margin-right: 5px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 47px;
    width: 47px;
    box-sizing: border-box;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    background: #333333;
}

.flag-emoji {
    padding: 8px 10px;
    cursor: pointer;
    border: 2px solid white;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
    background: #000000;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 47px;
    width: 47px;
    box-sizing: border-box;
    font-size: 14px;
}

.flag-emoji.active {
    border-color: #000000;
    background: white;
    color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.flag-emoji:hover {
    transform: scale(1.05);
    background: #333333;
}

.flag-emoji.active:hover {
    background: #f8f9fa;
    border-color: #000000;
}

.logo-container {
    text-align: center;
    margin-bottom: 10px;
}

.logo {
    width: 256.5px;
    height: 37.5px;
    margin-top: 15px;
    margin-bottom: 15px;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    margin-top: 0;
}

.calculation-mode {
    text-align: center;
    margin-bottom: 20px;
}

.mode-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 10px 20px;
    border: 2px solid #000000;
    background: #000000;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: #000000;
    color: white;
}

.mode-btn.inactive {
    background: #6c757d;
    color: white;
    border-color: #6c757d;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input,
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

input:focus,
select:focus {
    border-color: #000000;
    outline: none;
}

.unit-group {
    display: flex;
    gap: 10px;
}

.unit-group input {
    flex: 2;
}

.unit-group select {
    flex: 1;
}

button {
    width: 100%;
    padding: 15px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #333333;
}

.result {
    margin-top: 30px;
    padding: 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
    border-left: 4px solid #000000;
    display: none;
}

.result h3 {
    margin-top: 0;
    color: #000000;
}

.input-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
}

.conversion-note {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.field-note {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

.mode-indicator {
    text-align: center;
    margin-bottom: 15px;
    font-weight: bold;
    color: #000000;
    font-size: 16px;
}

.material-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.material-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.material-btn {
    padding: 10px 20px;
    border: 2px solid #6c757d;
    background: #6c757d;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.material-btn.active {
    background: #000000;
    border-color: #000000;
}

.coating-section {
    background-color: #f0f8ff;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #007bff;
}

.coating-section h4 {
    margin-top: 0;
    color: #007bff;
}

.advanced-toggle {
    text-align: center;
    margin: 20px 0;
}

.toggle-btn {
    padding: 10px 30px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #0056b3;
}

.calculation-details {
    background-color: #e8f5e8;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    font-size: 14px;
}

.error-field {
    border-color: #dc3545 !important;
    background-color: #f8d7da;
}

.beta-notice {
    text-align: center;
    margin-top: 40px;
    padding: 15px;
    font-size: 11px;
    color: #666;
    font-style: italic;
    border-top: 1px solid #eee;
}

/* Cost Section */
.cost-section {
    background-color: #f0f8f0;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #28a745;
}

/* Export Buttons */
.export-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.export-btn {
    padding: 10px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    flex: 1;
}

.export-btn:hover {
    background-color: #218838;
}

/* Dark Theme */
body.dark-theme {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-theme .calculator {
    background: #2d2d2d;
    color: #ffffff;
}

body.dark-theme h1,
body.dark-theme .mode-indicator {
    color: #ffffff !important;
}

body.dark-theme input,
body.dark-theme select {
    background-color: #3d3d3d;
    color: #ffffff;
    border-color: #555;
}

body.dark-theme .result {
    background-color: #3d3d3d;
    color: #ffffff;
}

body.dark-theme .input-summary {
    background-color: #4d4d4d;
}

body.dark-theme .theme-toggle-btn {
    background: white;
    color: #000000;
    border-color: white;
    height: 40px;
    max-width: 47px;
    width: 47px;
    font-size: 18px;
}

body.dark-theme .theme-toggle-btn:hover {
    background: #f0f0f0;
}

body.dark-theme .flag-emoji {
    height: 40px;
    max-width: 47px;
    width: 47px;
    font-size: 14px;
}

body.dark-theme .cost-section {
    background-color: #2d4d2d;
}

body.dark-theme .coating-section {
    background-color: #1a2d3d;
}

body.dark-theme .material-group {
    background-color: #3d3d3d;
}

body.dark-theme .calculation-details {
    background-color: #2d3d2d;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        margin: 20px auto;
        padding: 10px;
    }

    .calculator {
        padding: 20px;
    }

    .mode-buttons {
        flex-direction: column;
    }

    .material-buttons {
        flex-direction: column;
    }

    .unit-group {
        flex-direction: column;
    }

    .language-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 15px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .theme-toggle-btn,
    .flag-emoji {
        height: 35px;
        padding: 6px 8px;
        font-size: 16px;
        max-width: 47px;
        width: 47px;
    }

    .flag-emoji {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
    }

    .mode-btn,
    .material-btn {
        padding: 8px 15px;
        font-size: 14px;
    }

    .theme-toggle-btn,
    .flag-emoji {
        height: 32px;
        padding: 5px 6px;
        max-width: 47px;
        width: 47px;
        min-width: auto;
    }

    .theme-toggle-btn {
        font-size: 14px;
    }

    .flag-emoji {
        font-size: 11px;
    }
}

/* Print Styles */
@media print {
    .language-switcher,
    .advanced-toggle,
    .theme-toggle,
    .export-buttons,
    .beta-notice,
    button {
        display: none !important;
    }
    
    .calculator {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    body {
        background: white;
        margin: 0;
        padding: 0;
    }
    
    .result {
        display: block !important;
        background: white;
        border: 1px solid #000;
    }
}