/* Cardano Explorer Styles - Modern UI Update */
:root {
    --primary: #0033AD;
    --primary-dark: #00257A;
    --secondary: #FF5A00;
    --background: #0A0E17;
    --card-bg: #131B2E;
    --card-hover: #1A263D;
    --text: #FFFFFF;
    --text-secondary: #94A3B8;
    --border: #2D3748;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text);
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Search Section */
.search-section {
    margin: 2rem 0;
    position: relative;
}

.search-box {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-right: none;
    background: var(--card-bg);
    color: var(--text);
    outline: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 173, 0.2);
}

.search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-button {
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-button:hover {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
}

.search-button:hover {
    background: #ff8c2e;
    border-color: #ff8c2e;
}

/* Stats Section */
.stats-section {
    padding: 0 0 1em 0;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.stat-card {
    background: var(--list_line_even);
    border-radius: 0;
    padding: 1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 200px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.stat-card:hover {
    background: var(--select_hover);
    border-color: #DF7514;
    transform: translateY(-2px);
}

.stat-icon {
    display: none;
}

.stat-content {
    width: 100%;
}

.stat-label {
    font-size: .8em;
    color: #aaaaff;
    margin-bottom: .25em;
    font-weight: bold;
    font-variant: small-caps;
    padding: .25em;
}

.stat-value {
    font-size: 1.75em;
    font-weight: 700;
    color: #fff;
    font-family: monospace;
    text-shadow: 0 0 .25em rgba(0,0,0,1);
}

.stat-change {
    font-size: .75em;
    font-weight: 600;
    margin-top: .25em;
}

.text-success {
    color: #00c853;
}

.text-danger {
    color: #ff1744;
}

.text-muted {
    color: #999;
}

/* Content Section */
.content-section {
    padding: 0;
}

.tab-navigation {
    display: flex;
    gap: .5em;
    margin-bottom: 1em;
    flex-wrap: wrap;
}

.tab-btn {
    padding: .75em 1.25em;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #fff;
    border-radius: 3px;
    background: transparent;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .5em;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: var(--select_hover);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: #DF7514;
    border-color: #DF7514;
    color: #fff;
    box-shadow: 0 0 10px rgba(223, 117, 20, 0.5);
}

.tab-content {
    background: var(--list_line_odd);
    border-radius: 0;
    padding: 1.5em;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h2 {
    color: #DF7514;
    margin: 0 0 1em;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #DF7514;
    padding-bottom: .5em;
}

/* Form Elements */
.lookup-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.form-input {
    flex: 1;
    min-width: 300px;
    padding: .75em 1em;
    font-size: 15px;
    border: 2px solid #fff;
    border-radius: 3px;
    background: #000011;
    color: #fff;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #DF7514;
    box-shadow: 0 0 0 3px rgba(223, 117, 20, 0.2);
}

.form-input::placeholder {
    color: #666;
}

.btn {
    padding: .75em 1.5em;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: .5em;
}

.btn-primary {
    background: #DF7514;
    border-color: #DF7514;
    color: white;
}

.btn-primary:hover {
    background: #ff8c2e;
    border-color: #ff8c2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(223, 117, 20, 0.4);
}

/* Results Container */
.results-container {
    margin-top: 24px;
}

.result-card {
    background: var(--list_line_even);
    border-radius: 0;
    padding: 1.5em;
    margin-bottom: 1em;
    border-left: 4px solid #DF7514;
    transition: all 0.2s ease;
}

.result-card:hover {
    background: var(--select_hover);
    border-left-width: 6px;
}

.result-card h3 {
    color: #DF7514;
    margin: 0 0 1em;
    font-size: 18px;
    font-weight: 600;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #aaaaff;
    font-size: 12px;
    font-variant: small-caps;
}

.result-value {
    color: #fff;
    word-break: break-all;
    font-family: monospace;
}

/* NFT Grid */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.nft-card {
    background: var(--list_line_even);
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nft-card:hover {
    background: var(--select_hover);
    border-color: #DF7514;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.nft-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: #f0f0f0;
}

.nft-info {
    padding: 20px;
}

.nft-name {
    font-size: 16px;
    font-weight: 700;
    color: #DF7514;
    margin: 0 0 8px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.nft-description {
    font-size: 13px;
    color: #aaa;
    margin: 0 0 12px;
    line-height: 1.5;
}

.nft-meta {
    font-size: 11px;
    color: #aaaaff;
    font-family: monospace;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 3em;
    color: #aaaaff;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #DF7514;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.search-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content-custom {
    background-color: var(--list_line_odd);
    margin: 5% auto;
    padding: 32px;
    border-radius: 0;
    width: 90%;
    max-width: 900px;
    position: relative;
    border: 2px solid #DF7514;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #DF7514;
}

/* Responsive Design */
@media (max-width: 768px) {
    .explorer-header h1 {
        font-size: 32px;
    }

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

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

    .tab-navigation {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
        justify-content: center;
    }

    .tab-content {
        padding: 24px;
    }

    .lookup-form {
        flex-direction: column;
    }

    .form-input {
        width: 100%;
    }

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

/* Error Message */
.error-message {
    background: rgba(255, 50, 50, 0.2);
    color: #ff8888;
    padding: 16px 20px;
    border-radius: 0;
    margin-bottom: 16px;
    border-left: 4px solid #ff4444;
}

/* Success Message */
.success-message {
    background: rgba(50, 255, 50, 0.2);
    color: #88ff88;
    padding: 16px 20px;
    border-radius: 0;
    margin-bottom: 16px;
    border-left: 4px solid #44ff44;
}

/* Info Message */
.info-message {
    background: rgba(100, 100, 255, 0.2);
    color: #aaaaff;
    padding: 16px 20px;
    border-radius: 0;
    margin-bottom: 16px;
    border-left: 4px solid #6666ff;
}
