/* Modern KSU Calculator Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --light-blue: #ecf0f1;
    --border-color: #bdc3c7;
    --text-color: #2c3e50;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #2c3e50, #3498db);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.div {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 12px;
    box-sizing: border-box;
}

.wrapper {
    background: var(--gradient);
    border-radius: 12px;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.div1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.div2 {
    font-size: 14px;
    color: #000000;
    text-align: right;
    opacity: 0.9;
}

.div3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 10px 0;
    padding-left: 10px;
    border-left: 4px solid var(--accent-color);
}

.description-text {
    background: var(--light-blue);
    padding: 10px 15px;
    border-radius: 12px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
    border-left: 4px solid var(--accent-color);
}

.button_change_calculate {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    justify-content: flex-end;
}

.style_button {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style_button:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-1px);
}

.style_button.selected {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn_container, .btn_container1 {
    background: var(--gradient);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 280px;
    margin: 20px auto;
    text-align: center;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    display: block;
}

.btn_container:hover, .btn_container1:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button_and_form_wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.check_box {
    margin: 10px 0;
}

.check_box_css {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.3s ease;
}

.check_box_css:hover {
    background: var(--light-blue);
}

.check_box_css input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
}

.parent {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 12px;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parent2 {
    display: none;
}

.div5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 4px solid var(--accent-color);
    width: 100%;
}

.frame-parent, .frame-group, .frame-container {
    background: var(--light-blue);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 6px 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 30%;
}

.div7 {
    font-size: 13px;
    color: #666;
    min-width: 0;
    flex: 1;
    text-align: center;
}

.score-input {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.score-input input[type="text"] {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--white);
    text-align: center;
}

.score-input input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.div6 {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 500;
    min-width: 0;
    flex: 1;
    text-align: center;
}

input[type="text"], select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--white);
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

input[type="text"]::placeholder {
    color: #999;
}

.competition, .competition-2025 {
    background: var(--light-blue);
    padding: 12px;
    border-radius: 12px;
    margin: 10px 0;
    border-left: 4px solid var(--accent-color);
}

/* Медіа-запити */
@media (max-width: 768px) {
    .div {
        padding: 10px;
    }
    
    .button_change_calculate {
        flex-direction: column;
    }
    
    .style_button {
        width: 100%;
    }
    
    .btn_container, .btn_container1 {
        max-width: 100%;
    }
    
    .parent, .parent2,
    .second_form, .counter_second_calculate {
        flex-direction: column;
        gap: 10px;
    }
    
    .frame-parent, .frame-group, .frame-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .group {
        width: 100%;
    }
    
    .score-input {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .div6, .div7 {
        min-width: 0;
    }
    
    input[type="text"], select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .div6, .div7 {
        font-size: 14px;
    }
    
    input[type="text"], select {
        font-size: 14px;
    }
    
    .score-input input[type="text"] {
        font-size: 14px;
    }
}

/* Стилі для форм */
.competition {
    display: none;
}

.competition-2025 {
    display: none;
}

.competition.active, .calculate1.active {
    display: block;
}

/* Стилі для результатів */
#Result {
    margin-top: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.out-element {
    margin: 15px 0;
    transition: all 0.3s ease;
}

.out-element:hover {
    transform: translateX(8px);
}

.spec_c_wrapper {
    background: var(--light-blue);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.spec_c_wrapper:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
}

.spec_content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.spec_number {
    background: var(--white);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 90px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

.spec_number:hover {
    background: var(--accent-color);
    color: var(--white);
}

.spec_c_name {
    font-weight: 500;
    color: var(--primary-color);
    flex: 1;
    min-width: 250px;
    font-size: 1.1em;
    line-height: 1.4;
}

.spec_c_result {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1em;
    background: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    border: 2px solid var(--accent-color);
    min-width: 48px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: row;
    gap: 6px;
    white-space: nowrap;
}

.spec_c_add_line {
    display: inline-block;
    background: #eaf6ff;
    color: var(--accent-color);
    font-size: 0.92em;
    font-style: normal;
    border-radius: 6px;
    padding: 2px 6px;
    box-shadow: 0 1px 4px rgba(52, 152, 219, 0.07);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 6px;
    margin-top: 0;
    position: static;
}

@media (max-width: 768px) {
    .spec_content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .spec_number {
        min-width: 70px;
        font-size: 1em;
    }

    .spec_c_name {
        min-width: 100%;
        font-size: 1em;
    }

    .spec_c_result {
        min-width: 100px;
        font-size: 1.1em;
    }

    .spec_c_add_line {
        position: static;
        width: 100%;
        text-align: left;
        margin-top: 8px;
        background: transparent;
        box-shadow: none;
    }
}

/* Спеціальні стилі для 2023 року */
.competition-2025 .parent,
.competition-2025 .parent2 {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.competition-2025 .frame-parent,
.competition-2025 .frame-group,
.competition-2025 .frame-container {
    margin: 4px 0;
    background: var(--light-blue);
    border-radius: 12px;
    padding: 10px;
}

.competition-2025 .group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 4px 0;
}

.competition-2025 .div6 {
    min-width: 200px;
    font-weight: 500;
}

.competition-2025 .div7 {
    min-width: 100px;
}

.competition-2025 input[type="text"],
.competition input[type="text"] {
    box-shadow: none;
}

.competition-2025 input[type="text"]:focus,
.competition input[type="text"]:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Стилі для 2023 року */
.second_form, .counter_second_calculate {
    display: none;
}