:root {
    --bg-color: #0c111d;
    --card-bg: #161f30;
    --card-border: #233149;
    --card-hover: #1c273c;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #0ea5e9;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, Menlo, Monaco, monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 1rem;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

/* Hlavička */
header {
    margin-bottom: 2rem;
    text-align: center;
}

.badge-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.825rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
}

/* Informační blok o Allowlistu */
.allowlist-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(20, 30, 48, 0.9) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-left: 5px solid var(--warning);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
}

.allowlist-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.allowlist-icon {
    font-size: 1.5rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
}

.allowlist-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.allowlist-text {
    color: #cbd5e1;
    font-size: 0.975rem;
    margin-bottom: 1rem;
}

.allowlist-highlight {
    color: #fbbf24;
    font-weight: 600;
}

.allowlist-steps {
    background-color: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.allowlist-steps ol {
    padding-left: 1.25rem;
    color: #e2e8f0;
    font-size: 0.925rem;
}

.allowlist-steps li {
    margin-bottom: 0.5rem;
}

.allowlist-steps li:last-child {
    margin-bottom: 0;
}

.allowlist-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: #cbd5e1;
}

.form-input {
    background-color: rgba(10, 15, 26, 0.85);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 0.55rem 0.8rem;
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.form-input::placeholder {
    color: var(--text-dim);
    font-size: 0.85rem;
}

.allowlist-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Karty pro zobrazení IP */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ip-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ip-card:hover {
    border-color: #3b5074;
    transform: translateY(-2px);
}

.ip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ip-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ip-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tag-active {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-secondary {
    background-color: rgba(148, 163, 184, 0.12);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.tag-pending {
    background-color: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.ip-display-box {
    background-color: rgba(10, 15, 26, 0.8);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.ip-value {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    word-break: break-all;
    line-height: 1.3;
}

.ip-value.loading {
    color: var(--text-dim);
    font-size: 1.05rem;
    font-style: italic;
}

.ip-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

/* Tlačítka */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    text-decoration: none;
    background-color: #233149;
    color: #ffffff;
}

.btn:hover {
    background-color: #2f4263;
}

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

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

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.825rem;
}

/* Sekce s podrobnými parametry */
.details-section {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.details-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    color: #e2e8f0;
    font-family: var(--font-mono);
    word-break: break-all;
}

.detail-value.text-accent {
    color: #60a5fa;
}

.detail-value.text-muted-mono {
    font-size: 0.85rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

/* Patička */
footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
    font-size: 0.85rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

footer a:hover {
    color: var(--primary);
}

/* Toast notifikace */
#toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #1e293b;
    color: #ffffff;
    border: 1px solid var(--success);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

#toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 640px) {
    body {
        padding: 1rem 0.75rem;
    }
    h1 {
        font-size: 1.65rem;
    }
    .ip-grid {
        grid-template-columns: 1fr;
    }
    .allowlist-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .btn {
        width: 100%;
    }
    #toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        text-align: center;
        justify-content: center;
    }
}
