/* Dark Mode (default) */
body.dark-mode {
    background: linear-gradient(135deg, #1e293b, #475569);
    color: #e2e8f0;
}

.dark-mode .container {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-mode h2 {
    color: #60a5fa;
}

.dark-mode h2:after {
    background: linear-gradient(90deg, #1e40af, #60a5fa);
}

.dark-mode label {
    color: #93c5fd;
}

.dark-mode .input-group {
    background: #334155;
    border: 1px solid #475569;
}

.dark-mode .input-group:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.dark-mode select,
.dark-mode input[type="text"],
.dark-mode input[type="number"],
.dark-mode input[type="date"] {
    color: #e2e8f0;
}

.dark-mode .emsal {
    background-color: #60a5fa;
    color: #1e293b;
}

.dark-mode input[type="radio"] {
    accent-color: #60a5fa;
}

.dark-mode .result-box {
    background: #334155;
    border: 1px solid #475569;
}

.dark-mode .result-box input {
    color: #e2e8f0;
    background: #1e293b;
    border: 1px solid #475569;
}

.dark-mode .special-section,
.dark-mode #dateRangeContainer {
    background: #334155;
    border: 1px solid #475569;
}

/* Light Mode */
body.light-mode {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #1e3a8a;
}

.light-mode .container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.light-mode h2 {
    color: #1e3a8a;
}

.light-mode h2:after {
    background: linear-gradient(90deg, #1e3a8a, #3b82f6);
}

.light-mode label {
    color: #1e3a8a;
}

.light-mode .input-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.light-mode .input-group:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.light-mode select,
.light-mode input[type="text"],
.light-mode input[type="number"],
.light-mode input[type="date"] {
    color: #1e3a8a;
}

.light-mode .emsal {
    background-color: #3b82f6;
    color: white;
}

.light-mode input[type="radio"] {
    accent-color: #3b82f6;
}

.light-mode .result-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.light-mode .result-box input {
    color: #1e3a8a;
    background: white;
    border: 1px solid #e2e8f0;
}

.light-mode .special-section,
.light-mode #dateRangeContainer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Mode Toggle Button */
.mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.mode-toggle:hover {
    background: rgba(0, 0, 0, 0.3);
}

.mode-toggle i {
    font-size: 20px;
    color: white;
}

.light-mode .mode-toggle {
    background: rgba(255, 255, 255, 0.2);
}

.light-mode .mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.light-mode .mode-toggle i {
    color: #1e3a8a;
}

/* Rest of your existing CSS (all the common styles) */
/* General Layout */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

/* Container */
.container {
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 960px;
    position: relative;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

/* Heading */
h2 {
    margin-bottom: 28px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 12px;
    transition: all 0.3s ease;
}

h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Form Sections */
.form-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Labels */
label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

select, 
input[type="text"], 
input[type="number"], 
input[type="date"] {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
}

/* Coefficients */
.emsal {
    padding: 8px 12px;
    margin-left: 12px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 48px;
    text-align: center;
    font-size: 13px;
    transition: all 0.3s ease;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.radio-option {
    display: flex;
    align-items: center;
}

input[type="radio"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    transition: all 0.3s ease;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
}

button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submitBtn {
    background: linear-gradient(135deg, #1e40af, #60a5fa);
    color: white;
}

#submitBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(96, 165, 250, 0.3);
}

button[type="reset"] {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: white;
}

button[type="reset"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.3);
}

/* Result Section */
.result-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.result-box {
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-box label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.result-box input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

/* Special Sections */
.special-section {
    grid-column: span 2;
    padding: 24px;
    border-radius: 12px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

/* Date Range */
#dateRangeContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.date-input-group {
    display: flex;
    flex-direction: column;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 24px;
    }
    
    .form-section {
        grid-template-columns: 1fr;
    }
    
    .result-section {
        grid-template-columns: 1fr;
    }
    
    #dateRangeContainer {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .special-section {
        grid-column: span 1;
    }
}

/* Hidden Elements */
#Rdiv, #Rlabelid,
#ElDasinmaDiv, #ElDasinmaDivLable,
#RepiterDiv, #RepiterDivLable,
#Dupleks-Simpleks_div, #Dupleks-Simpleks, #Dupleks-Simpleks_label {
    display: none;
}

/* Show when active */
.show {
    display: block !important;
}

/* Select element styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2360a5fa'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 32px !important;
}

.light-mode select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e3a8a'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
}

#InputDivSum {
    border: 2px solid #60a5fa;
}

.light-mode #InputDivSum {
    border: 2px solid #3b82f6;
}

#revSualandiriciId, #revSualandirici, #m5Label {
    display: none;
}


/* Dark Mode Select Elements - Fixed */
.dark-mode select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #475569;
    background-color: #334155;
    color: #e2e8f0;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2360a5fa'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all 0.3s ease;
    box-shadow: none;
    outline: none;
}

.dark-mode select:hover {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.dark-mode select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

.dark-mode select option {
    background-color: #334155;
    color: #e2e8f0;
    padding: 10px;
    margin: 5px 0;
}

.dark-mode select option:hover {
    background-color: #60a5fa !important;
    color: #1e293b !important;
}

.dark-mode select option:checked,
.dark-mode select option:selected {
    background-color: #1e40af;
    color: #e2e8f0;
    font-weight: 600;
}

.dark-mode .input-group select {
    background-color: transparent;
    border: none;
    padding: 8px 0;
}

.dark-mode .input-group select:focus {
    box-shadow: none;
}