:root {
    --primary: #CB3837;
    --primary-hover: #b02e2c;
    --secondary: #FF6B6B;
    --accent: #00CEC9;
    --bg-base: #0a0404;
    --bg-card: #1A0A0A;
    --bg-card-hover: #220d0d;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --border: rgba(255, 255, 255, 0.1);

    --success: #00CEC9;
    --warning: #f1c40f;
    --error: #CB3837;

    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(203, 56, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 206, 201, 0.05) 0%, transparent 50%);
}

.hidden {
    display: none !important;
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 0.5rem;
}

.logo svg {
    height: 35px;
}

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background-clip: text;
    -webkit-background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #fff;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

/* Search Section */
.search-section {
    padding: 2rem;
}

.input-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(203, 56, 55, 0.2);
}

.prefix {
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-family: monospace;
    font-size: 1.1rem;
    user-select: none;
}

input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    font-family: monospace;
    padding: 1rem;
    outline: none;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.batch-toggle {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.batch-toggle input {
    margin-right: 0.5rem;
    accent-color: var(--primary);
}

/* Loading */
#loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

#result-name {
    font-size: 1.8rem;
    font-family: monospace;
    word-break: break-all;
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-available {
    background: rgba(0, 206, 201, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 206, 201, 0.3);
}

.status-taken {
    background: rgba(203, 56, 55, 0.15);
    color: var(--error);
    border: 1px solid rgba(203, 56, 55, 0.3);
}

.status-invalid {
    background: rgba(241, 196, 15, 0.15);
    color: var(--warning);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Validation List */
.validation-list {
    list-style: none;
}

.validation-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.validation-list li.pass {
    color: var(--text-main);
}

.validation-list li.fail {
    color: var(--error);
}

.validation-list li::before {
    content: '○';
    font-size: 1.2rem;
}

.validation-list li.pass::before {
    content: '✓';
    color: var(--success);
}

.validation-list li.fail::before {
    content: '✗';
    color: var(--error);
}

/* Risk Score */
.risk-score {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.risk-score.low {
    color: var(--success);
}

.risk-score.medium {
    color: var(--warning);
}

.risk-score.high {
    color: var(--error);
}

.desc-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

#similar-list {
    list-style: none;
    margin-top: 0.8rem;
}

#similar-list li {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.3rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.similarity-val {
    color: var(--secondary);
    font-size: 0.8rem;
}

/* Tags & Suggestions */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-family: monospace;
    color: var(--text-main);
    text-decoration: none;
}

.tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--accent);
}

.tag.available {
    border-color: rgba(0, 206, 201, 0.3);
}

.tag.taken {
    border-color: rgba(203, 56, 55, 0.3);
    opacity: 0.6;
}

/* Batch Table */
.batch-table {
    width: 100%;
    border-collapse: collapse;
}

.batch-table th,
.batch-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.batch-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.batch-table td.name {
    font-family: monospace;
    font-weight: 600;
}

.action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

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

/* Guides */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.guide-item {
    display: flex;
    gap: 1rem;
}

.guide-item .icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    font-weight: bold;
}

.guide-item:first-child .icon,
.guide-item:nth-child(2) .icon {
    color: var(--success);
}

.guide-item:last-child .icon {
    color: var(--warning);
}

.guide-item h4 {
    margin-bottom: 0.3rem;
    color: #e0e0e0;
}

.guide-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.empty-text {
    color: var(--text-muted);
    font-style: italic;
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-decoration: underline;
}

.text-btn:hover {
    color: white;
}

@media (max-width: 768px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

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

    .primary-btn {
        padding: 1rem;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}