@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #212121;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.specifications,
.battery-info,
.calculator-container {
    flex: 1 1 300px;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
}

h1 {
    text-align: center;
    color: #3f51b5;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    text-align: center;
    color: #3f51b5;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

p {
    font-size: 1em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

a {
    color: #3f51b5;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #5c6bc0;
}

.section {
    margin-bottom: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #3f51b5;
    text-transform: uppercase;
    text-align: center;
}

.section p {
    font-size: 0.95em;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

.section label {
    font-size: 1em;
    margin-bottom: 8px;
    color: #666;
    display: block;
    padding-bottom: 5px;
}

.section select {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    color: #212121;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.section select:focus {
    border-color: #3f51b5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
}

#module-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.reset-btn,
.copy-btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    font-size: 1.1em;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.reset-btn {
    background-color: #3f51b5;
}
.reset-btn:hover {
    background-color: #5c6bc0;
}

.copy-btn {
    background-color: #4caf50;
}
.copy-btn:hover {
    background-color: #66bb6a;
}

.total {
    text-align: right;
    font-size: 1.8em;
    color: #3f51b5;
    font-weight: bold;
    margin-top: 20px;
}

.output {
    margin-top: 30px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    white-space: pre-wrap;
    font-size: 1em;
    color: #666;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ---------- Адаптация ---------- */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        padding: 20px;
        margin: 20px;
    }

    h1 {
        font-size: 2em;
    }
}

@media (max-width: 600px) {
    .section {
        padding: 16px;
    }

    .section h2 {
        font-size: 1.3em;
    }

    .section label,
    .section select,
    .section p {
        font-size: 0.95em;
    }

    .reset-btn,
    .copy-btn {
        font-size: 1em;
        padding: 12px;
    }

    .total {
        font-size: 1.5em;
        text-align: center;
    }

    #module-selection {
        grid-template-columns: 1fr;
    }

    .container {
        gap: 20px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.6em;
    }

    .section h2 {
        font-size: 1.1em;
    }

    .total {
        font-size: 1.3em;
    }
}
