:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --bg: #f0fdf4;
    --card-bg: #ffffff;
    --text: #064e3b;
    --text-secondary: #065f46;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 64px 24px;
}

header {
    text-align: center;
    margin-bottom: 56px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.domain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.domain-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.domain-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #34d399);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.domain-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.domain-card:hover::before {
    opacity: 1;
}

.domain-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
    word-break: break-all;
}

.domain-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 78, 59, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(16px) scale(0.98);
    transition: transform 0.25s ease;
    position: relative;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: #a7f3d0;
}

.modal-header {
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    word-break: break-all;
}

.modal-body {
    margin-bottom: 28px;
}

.modal-section {
    margin-bottom: 16px;
}

.modal-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 6px;
}

.modal-section p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

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

.btn-outline {
    background: transparent;
    color: var(--primary-dark);
    border-color: var(--primary);
}

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

footer {
    text-align: center;
    margin-top: 64px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    header h1 {
        font-size: 2rem;
    }

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

    .modal {
        padding: 24px;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}
