/* ================== Unused CSS Checker Page Styles ================== */

/* ===== Main Layout ===== */
.unused-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

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

/* ===== Input Panel ===== */
.input-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.code-input-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(45, 52, 54, 0.08);
}

.code-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.code-input-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.code-input-actions {
    display: flex;
    gap: 8px;
}

.btn-sample,
.btn-clear {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sample:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-clear:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* ===== Code Textarea ===== */
.code-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(145deg, #f8f9fa, #f1f3f5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-primary);
    resize: vertical;
    transition: all 0.2s;
}

.code-textarea:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.code-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.code-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.code-textarea--html {
    border-left: 4px solid #e67e22;
}

.code-textarea--css {
    border-left: 4px solid #3498db;
}

/* ===== Analyze Button ===== */
.btn-analyze {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border: 2px solid #4f46e5;
    border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-analyze:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border-color: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-analyze:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

/* ===== Results Panel ===== */
.results-panel {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(45, 52, 54, 0.08);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.btn-copy-results {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy-results:hover {
    background: var(--accent-primary);
    color: white;
}

/* ===== Statistics Bar ===== */
.stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 10px;
    border-radius: 12px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    transition: all 0.2s;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-item--total .stat-value {
    color: var(--accent-primary);
}

.stat-item--used .stat-value {
    color: #27ae60;
}

.stat-item--unused .stat-value {
    color: #e74c3c;
}

/* ===== Results Tabs ===== */
.results-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bg-main);
    padding: 6px;
    border-radius: 12px;
}

.results-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.results-tab:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.results-tab.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--border-color);
    font-size: 0.8rem;
    font-weight: 700;
}

.results-tab.active .tab-count {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

/* ===== Results Container ===== */
.results-container {
    min-height: 300px;
    max-height: 450px;
    overflow-y: auto;
    padding: 4px;
}

.results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 280px;
    text-align: center;
}

.results-empty__icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.results-empty__text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== Result Item ===== */
.result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-main);
    transition: all 0.2s;
}

.result-item:hover {
    transform: translateX(4px);
}

.result-item--unused {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.05);
}

.result-item--unused:hover {
    border-color: rgba(231, 76, 60, 0.5);
}

.result-item--used {
    border-color: rgba(39, 174, 96, 0.3);
    background: rgba(39, 174, 96, 0.05);
}

.result-item--used:hover {
    border-color: rgba(39, 174, 96, 0.5);
}

.result-item__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.result-item__selector {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    word-break: break-all;
}

.result-item--unused .result-item__selector {
    color: #e74c3c;
}

.result-item--used .result-item__selector {
    color: #27ae60;
}

.result-item__copy {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
}

.result-item:hover .result-item__copy {
    opacity: 1;
}

.result-item__copy:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-primary);
}

/* ===== Info Section ===== */
.info-section {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(45, 52, 54, 0.08);
}

.info-section__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .info-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .info-cards {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.info-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.info-card__icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.info-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.info-card__desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ===== Usage Guide ===== */
.usage-guide {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(45, 52, 54, 0.08);
}

.usage-guide__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.usage-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.usage-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.usage-step__number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}

.usage-step__content {
    flex: 1;
}

.usage-step__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.usage-step__desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ===== Notice Section ===== */
.notice-section {
    margin-top: 30px;
}

.notice-box {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: rgba(230, 126, 34, 0.1);
    border: 2px solid rgba(230, 126, 34, 0.3);
    border-radius: 12px;
}

.notice-box__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.notice-box__content {
    flex: 1;
}

.notice-box__title {
    font-size: 1rem;
    font-weight: 700;
    color: #d35400;
    margin: 0 0 6px 0;
}

.notice-box__text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text-primary);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== Custom Scrollbar ===== */
.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: var(--bg-main);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.results-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] .code-textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .code-textarea:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .code-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
}

[data-theme="dark"] .result-item {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .info-card {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .stat-item {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .results-tabs {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .results-tab.active {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notice-box {
    background: rgba(230, 126, 34, 0.08);
}

[data-theme="dark"] .btn-analyze {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5), 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-analyze:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border-color: #4f46e5;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
}

