/* ==========================================================================
   Card Crow - Deck Analysis Page Styles
   ========================================================================== */

/* Analysis Page Layout */
.analysis-page {
    display: block;
    background-color: var(--bg-primary);
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.analysis-main {
    max-width: 900px;
    margin: 0 auto;
}

.analysis-section {
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.analysis-section h2 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.analysis-section .section-header-row h2 {
    margin-bottom: 0;
}

/* Warnings Section */
.warnings-section {
    background-color: rgba(251, 191, 36, 0.1);
    border: 1px solid var(--accent-warning);
}

.warnings-section h2 {
    color: var(--accent-warning);
}

.warning-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--accent-warning);
}

.warning-item::before {
    content: "\26A0";
}

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

.stat-card {
    background-color: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Mana Curve */
.mana-curve {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 180px;
    padding: 1rem 0;
}

.mana-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mana-bar-fill {
    width: 100%;
    max-width: 50px;
    background-color: var(--accent-secondary);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.3s ease;
    min-height: 4px;
}

.mana-bar-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mana-bar-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Color Distribution */
.color-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
}

.color-pip {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.color-pip-W { background-color: #f9faf4; color: #333; }
.color-pip-U { background-color: #0e68ab; color: white; }
.color-pip-B { background-color: #150b00; color: #ccc; border: 1px solid #444; }
.color-pip-R { background-color: #d3202a; color: white; }
.color-pip-G { background-color: #00733e; color: white; }
.color-pip-C { background-color: #9ea1a4; color: #333; }

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

.color-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Type Distribution */
.type-distribution {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.type-item {
    padding: 0.5rem 1rem;
    background-color: var(--bg-card);
    border-radius: var(--radius-sm);
}

.type-count {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 0.25rem;
}

.type-label {
    color: var(--text-muted);
}

/* Sample Draw */
.sample-draw-controls {
    display: flex;
    gap: 0.5rem;
}

.sample-hand {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    min-height: 150px;
    align-items: flex-start;
}

.sample-card {
    position: relative;
    width: 130px;
    aspect-ratio: 63/88;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.sample-card:hover {
    transform: scale(1.05);
}

.sample-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sample Card Wrapper (for DFC) */
.sample-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.turn-over-btn-small {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    margin-top: 0.35rem;
}

.turn-over-btn-small .turn-icon {
    font-size: 0.85rem;
}
