/* TLD Single Page Styles */

.hero-section {
    text-align: center;
    margin-bottom: 40px;
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--nrds-blue) 0%, var(--nrds-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    padding-bottom: 10px;
    display: inline-block;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 15px;
}

.page-nav-links {
    margin-top: 20px;
    font-size: 0.95em;
}

.page-nav-links a {
    color: var(--nrds-blue);
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-nav-links a:hover {
    color: var(--nrds-dark);
    text-decoration: underline;
}

/* Stats Summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: var(--bg-white);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(10, 186, 181, 0.1);
}

.stat-box:hover {
    border-color: var(--nrds-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(54, 209, 182, 0.2);
}

.stat-box h3 {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-box p {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--nrds-blue);
    margin: 0 0 5px 0;
}

.stat-box small {
    display: block;
    font-size: 0.75em;
    color: var(--text-light);
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chart Section */
.chart-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(10, 186, 181, 0.1);
    margin-bottom: 30px;
}

.chart-container {
    position: relative;
    height: 450px;
}

/* Analysis Section */
.analysis-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 20px rgba(10, 186, 181, 0.1);
    margin-bottom: 40px;
}

.analysis-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.analysis-controls h2 {
    font-size: 1.8em;
    color: var(--text-primary);
    margin: 0;
}

.toggle-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--nrds-blue) 0%, var(--nrds-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 209, 182, 0.3);
}

.analysis-grid {
    display: grid;
    gap: 30px;
}

.analysis-block {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid var(--border-light);
}

.analysis-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.analysis-block h3 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    gap: 15px;
}

.stat-item {
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.stat-label {
    font-size: 0.95em;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-bar {
    height: 12px;
    background: var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--nrds-blue), var(--nrds-dark));
    transition: width 0.5s ease;
}

.stat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-count {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-percent {
    font-size: 0.9em;
    color: var(--nrds-blue);
    font-weight: 600;
}

/* Horizontal Stats Grid */
.stats-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.stat-box-simple {
    background: var(--bg-gray);
    padding: 25px 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.stat-box-simple:hover {
    border-color: var(--nrds-blue);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(54, 209, 182, 0.15);
}

.stat-box-simple .stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--nrds-blue);
    margin-bottom: 8px;
}

.stat-box-simple .stat-label {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* Registrar List */
.registrar-list {
    display: grid;
    gap: 15px;
}

.registrar-item {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.registrar-item:hover {
    border-color: var(--nrds-blue);
    box-shadow: 0 2px 10px rgba(54, 209, 182, 0.1);
}

.registrar-rank {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--nrds-blue), var(--nrds-dark));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
}

.registrar-info {
    flex: 1;
}

.registrar-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.registrar-count {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* No Data */
.no-data {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: 12px;
}

.no-data h2 {
    color: var(--text-secondary);
}

.no-data p {
    color: var(--text-light);
}

/* Date Indicator */
.date-indicator {
    display: inline-block;
    padding: 6px 12px;
    background: var(--nrds-lighter);
    color: var(--nrds-dark);
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-summary {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analysis-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .stats-grid-horizontal {
        grid-template-columns: 1fr;
    }
}

/* TLD Search Box */
.tld-search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

.tld-search-box input {
    padding: 12px 20px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    width: 280px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.tld-search-box input:focus {
    outline: none;
    border-color: var(--nrds-blue);
}

.tld-search-box button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--nrds-blue) 0%, var(--nrds-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tld-search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 209, 182, 0.3);
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-light);
    border-top-color: var(--nrds-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-state p {
    color: var(--text-secondary);
    font-size: 1.1em;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: 12px;
}

.error-state h2 {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.error-state p {
    color: var(--text-light);
}