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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.content {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.info-text {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(66, 133, 244, 0.3);
}

.results {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 15px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

.result-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.result-value {
    font-size: 28px;
    font-weight: 700;
    color: #4285f4;
}

.result-value.highlight {
    color: #ea4335;
    font-size: 32px;
}

.result-value.success {
    color: #34a853;
    font-size: 32px;
}

.roas-explanation {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.recommendations {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recommendations h3 {
    color: #333;
    margin-bottom: 15px;
}

.recommendations ul {
    list-style: none;
}

.recommendations li {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
    line-height: 1.6;
}

.recommendations li:last-child {
    border-bottom: none;
}

.recommendations li::before {
    content: "✓ ";
    color: #34a853;
    font-weight: bold;
    margin-right: 8px;
}

/* Кнопка повернення */
.back-home-container {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.back-home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

.back-arrow {
    font-size: 20px;
    transition: transform 0.3s;
}

.back-home-btn:hover .back-arrow {
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 24px;
    }

    .content {
        padding: 30px 20px;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-value {
        font-size: 24px;
    }

    .result-value.highlight,
    .result-value.success {
        font-size: 28px;
    }
}


/* Адаптив для 420px */
@media (max-width: 420px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 15px;
    }

    .header {
        padding: 25px 15px;
    }

    .header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .header p {
        font-size: 14px;
    }

    .content {
        padding: 25px 15px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select {
        padding: 12px;
        font-size: 14px;
    }

    .info-text {
        font-size: 12px;
    }

    .calculate-btn {
        padding: 15px;
        font-size: 16px;
    }

    .results {
        padding: 20px 15px;
        margin-top: 25px;
    }

    .results h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .result-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .result-card {
        padding: 15px;
    }

    .result-label {
        font-size: 13px;
    }

    .result-value {
        font-size: 24px;
    }

    .result-value.highlight,
    .result-value.success {
        font-size: 26px;
    }

    .recommendations {
        padding: 20px 15px;
    }

    .recommendations h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .recommendations li {
        padding: 10px 0;
        font-size: 13px;
    }

    .back-home-container {
        padding: 20px 15px;
    }

    .back-home-btn {
        padding: 12px 20px;
        font-size: 14px;
        gap: 8px;
    }

    .back-arrow {
        font-size: 18px;
    }
}
