/* MetaMask RPC Changer - Стилі */

:root {
    --primary-color: #f6851b;
    --secondary-color: #037dd6;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.9;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Статус бар */
.status-bar {
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.status-success {
    background: var(--success-color);
    color: white;
}

.status-error {
    background: var(--error-color);
    color: white;
}

.status-warning {
    background: var(--warning-color);
    color: white;
}

.status-info {
    background: var(--info-color);
    color: white;
}

/* Форма */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.required {
    color: var(--error-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.9em;
}

/* Кнопки */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #e67a16;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(246, 133, 27, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background: var(--secondary-color);
    color: white;
}

.btn-small:hover {
    background: #0369b8;
}

.btn-icon {
    font-size: 1.2em;
}

/* Шаблони мереж */
.network-templates {
    display: grid;
    gap: 10px;
}

.network-template {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.network-template:hover {
    border-color: var(--primary-color);
    background: #f9f9f9;
}

.network-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chain-id {
    font-size: 0.9em;
    color: #666;
}

/* Інформаційна картка */
.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-card strong {
    color: var(--secondary-color);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 30px;
}

footer a {
    color: white;
    text-decoration: underline;
}

.version {
    margin-top: 10px;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Нові стилі для generator та gallery */
.link-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.link-section h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.link-box {
    display: flex;
    gap: 10px;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    margin-bottom: 10px;
}

.link-box code {
    flex: 1;
    word-break: break-all;
    font-size: 0.9em;
    color: var(--secondary-color);
    font-family: 'Courier New', monospace;
}

.qr-section {
    margin-top: 30px;
}

.qr-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.qr-item {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.qr-item h4 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.qr-item > div {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    min-height: 256px;
    align-items: center;
}

/* Адаптивність */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    .card {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .network-template {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .network-template button {
        width: 100%;
    }

    .link-box {
        flex-direction: column;
    }

    .qr-container {
        grid-template-columns: 1fr;
    }
}