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

body {
    font-family: Arial, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;
}

/* Header */
header {
    background: rgba(0, 0, 0, 0.85);
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(67, 160, 71, 0.3);
    flex-shrink: 0;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 60px;
}

.header-logo {
    height: 40px;
    flex-shrink: 0;
}

.header-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header h1 {
    color: white;
    font-size: 1.8rem;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.subtitle {
    font-size: 0.9rem;
    color: #43a047;
    font-weight: normal;
    margin: 0;
}

/* Main Content */
main {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    width: 50%;
    max-width: 50%;
}

/* Conversion Sections */
.conversion-section {
    margin-bottom: 20px;
    border: 1px solid rgba(67, 160, 71, 0.3);
    border-radius: 5px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.7);
}

.section-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(67, 160, 71, 0.3);
}

.section-header h2 {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.section-content {
    padding: 15px;
}

/* Instruction Box */
.instruction-box {
    background: rgba(67, 160, 71, 0.1);
    border-left: 3px solid #43a047;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 3px;
}

.instruction-box p {
    margin-bottom: 8px;
    line-height: 1.4;
    color: #ccc;
    font-size: 12px;
}

.instruction-box p:last-child {
    margin-bottom: 0;
}

/* Advanced Panel */
.advanced-panel {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(67, 160, 71, 0.3);
    border-radius: 5px;
    padding: 12px;
    margin: 12px 0;
}

.advanced-panel h3 {
    color: #43a047;
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: bold;
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.form-group label {
    font-weight: normal;
    margin-bottom: 4px;
    color: white;
    font-size: 12px;
}

.form-group input[type="number"] {
    padding: 7px 10px;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.2s ease;
    background: #2a2a2a !important;
    color: white !important;
}

/* Remove number input spinners */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    background: #2a2a2a !important;
    color: white !important;
}

/* Prevent autofill from changing colors */
input[type="number"]:-webkit-autofill,
input[type="number"]:-webkit-autofill:hover,
input[type="number"]:-webkit-autofill:focus,
input[type="number"]:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #2a2a2a inset !important;
    -webkit-text-fill-color: white !important;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #43a047;
    box-shadow: 0 0 0 2px rgba(67, 160, 71, 0.2);
    background: #2a2a2a !important;
    color: white !important;
}

.form-group input[type="number"]:invalid {
    border-color: #e53935;
    background-color: rgba(229, 57, 53, 0.1) !important;
    color: white !important;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    color: white;
    font-size: 12px;
}

.radio-group input[type="radio"] {
    margin-right: 6px;
    cursor: pointer;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 9px 14px;
    background: #43a047;
    color: white;
}

button:hover {
    background: #2e7d32;
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-primary {
    background: #43a047;
    color: white;
    width: 100%;
    padding: 12px;
    font-size: 12px;
    margin-top: 12px;
    font-weight: bold;
}

.btn-primary:hover:not(:disabled) {
    background: #2e7d32;
}

.btn-primary:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-secondary {
    background: #555;
    color: white;
    border: 1px solid #555;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #666;
    border-color: #666;
}

.btn-toggle {
    background: transparent;
    color: #43a047;
    padding: 6px 12px;
    font-size: 11px;
    border: 1px solid #43a047;
    font-weight: bold;
}

.btn-toggle:hover {
    background: rgba(67, 160, 71, 0.1);
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

/* File Input */
.file-input-section {
    margin: 12px 0;
}

.btn-file-input {
    display: inline-block;
    background: #43a047;
    color: white;
    padding: 9px 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    font-size: 12px;
}

.btn-file-input:hover {
    background: #2e7d32;
}

.btn-file-input input[type="file"] {
    display: none;
}

.file-list {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    border-radius: 3px;
    min-height: 40px;
}

.file-list:empty::before {
    content: "No files selected";
    color: #888;
    font-style: italic;
    font-size: 12px;
}

.file-item {
    padding: 6px;
    margin-bottom: 4px;
    background: rgba(67, 160, 71, 0.1);
    border-left: 3px solid #43a047;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: white;
}


/* Progress */
.progress-container {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #555;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #43a047;
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 11px;
}

.progress-text {
    text-align: center;
    color: #43a047;
    font-weight: bold;
    font-size: 12px;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.85);
    padding: 12px 20px;
    text-align: center;
    color: #888;
    border-top: 1px solid rgba(67, 160, 71, 0.3);
    font-size: 12px;
    flex-shrink: 0;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        margin-left: 10px;
        gap: 10px;
    }
    
    .header-logo {
        height: 30px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    main {
        padding: 12px;
        width: 100%;
        max-width: 100%;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advanced-panel {
    animation: slideIn 0.2s ease-out;
}

/* Alert Messages */
.alert {
    padding: 10px 12px;
    border-radius: 3px;
    margin: 12px 0;
    font-weight: normal;
    font-size: 12px;
}

.alert-success {
    background: rgba(67, 160, 71, 0.2);
    color: #66bb6a;
    border: 1px solid #43a047;
}

.alert-error {
    background: rgba(229, 57, 53, 0.2);
    color: #ef5350;
    border: 1px solid #e53935;
}

.alert-info {
    background: rgba(67, 160, 71, 0.1);
    color: #ccc;
    border: 1px solid rgba(67, 160, 71, 0.3);
}

/* Help Icons */
.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: rgba(67, 160, 71, 0.3);
    color: #43a047;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
    border: 1px solid rgba(67, 160, 71, 0.5);
}

.help-icon:hover {
    background: rgba(67, 160, 71, 0.5);
    color: #66bb6a;
    border-color: #43a047;
}
