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

body {
    font-family: Arial, sans-serif;
    background: #050510;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}

/* Шапка сайта */
.header {
    background: #0a0a2e;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #38bdf8;
}

.header h1 {
    font-size: 18px;
    color: #38bdf8;
    text-shadow: 0 0 15px #38bdf8;
}

.header p {
    color: #64748b;
    font-size: 11px;
    margin-top: 3px;
}

/* Сетка карточек на главной */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* Карточки-ссылки */
.card {
    background: #1a1a2e;
    border: 1px solid #38bdf8;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.3);
}

.card:active {
    transform: scale(0.95);
}

.card .icon {
    font-size: 30px;
    display: block;
    margin-bottom: 5px;
}

/* Контейнер для отдельной утилиты (страницы) */
.tool-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 15px;
}

.tool-card {
    background: #1a1a2e;
    border: 1px solid #a855f7;
    border-radius: 12px;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

.tool-card h2 {
    color: #38bdf8;
    font-size: 18px;
    margin-bottom: 5px;
}

.tool-card .desc {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 15px;
}

/* Формы и элементы управления */
input, select, textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 7px;
    border: 1px solid #38bdf8;
    background: #0a0a1a;
    color: #fff;
    margin: 5px 0;
}

button {
    background: #38bdf8;
    color: #05050d;
    border: none;
    padding: 10px 15px;
    border-radius: 7px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin: 5px 0;
    transition: 0.2s;
}

button:hover {
    opacity: 0.85;
}

button:active {
    transform: scale(0.97);
}

.btn-red {
    background: #ef4444;
    color: #fff;
}

.btn-gray {
    background: #64748b;
    color: #fff;
}

/* Кнопка возврата на главную */
.btn-back {
    display: block;
    text-align: center;
    background: #334155;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 7px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 15px;
    transition: 0.2s;
}

.btn-back:hover {
    background: #475569;
}

/* Результаты вычислений */
.result {
    background: #0a0a1a;
    padding: 12px;
    border-radius: 7px;
    margin: 10px 0;
    text-align: center;
    font-size: 16px;
    color: #fbbf24;
    border: 1px solid #a855f7;
    animation: fadeIn 0.3s;
}

.row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.row > * {
    flex: 1;
    min-width: 100px;
}

/* SEO-блок внизу каждой утилиты */
.seo-text {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}

.seo-text h3 {
    color: #38bdf8;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Подвал */
.footer {
    text-align: center;
    padding: 20px 15px;
    color: #64748b;
    font-size: 11px;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
