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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-x: hidden;
}

/* Top-right action area for import button */
.action-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Main content area */
.main-content {
    flex: 1;
    padding: 80px 40px 40px 40px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bottom section for loaded names - REMOVED */

header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* File info badge - removed from header, now in bottom-right */
.file-info {
    display: none;
}

/* File info in bottom-right stats */
.file-info-bottom {
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
    font-size: 0.75rem;
    color: #6c757d;
    line-height: 1.4;
}

.file-info-bottom:empty {
    display: none;
    padding: 0;
    border: none;
}

.file-info-bottom strong {
    color: #495057;
    font-weight: 600;
}

/* Controls section */
.controls .btn-group {
    max-width: 600px;
    margin: 0 auto;
}

/* Result section */
.result-section {
    margin: 40px auto;
    max-width: 800px;
}

.selected-name-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
    min-height: 150px;
}

.selected-name {
    color: #333;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    animation: fadeIn 0.5s ease;
}

.selected-name:empty::before {
    content: 'Click "Pick Random Name" to start';
    color: #6c757d;
    font-size: 1.2rem;
    font-weight: normal;
}

.selected-name-card.highlight {
    background: linear-gradient(135deg, #FFE082, #FFC107);
    transform: scale(1.02);
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Name list preview in bottom section */
.name-list-preview {
    padding: 20px;
    overflow-y: auto;
    text-align: left;
    display: none;
}

.name-list-preview h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-weight: 700;
    font-size: 1.5rem;
}

.name-list-preview ul {
    columns: 3;
    column-gap: 30px;
    list-style: none;
    padding: 0;
}

.name-list-preview li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    break-inside: avoid;
    transition: all 0.2s ease;
    border-left: 3px solid #667eea;
}

.name-list-preview li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

/* Stats section - Bottom Right Corner */
.stats-bottom-right {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    min-width: 220px;
    max-width: 280px;
}

.stats-bottom-right .card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.stats-bottom-right .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2) !important;
}

.stats-bottom-right .card-body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
}

.stats-bottom-right .d-flex {
    gap: 15px;
}

/* Clickable stat item */
.stat-item-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    margin: -5px;
    border-radius: 8px;
}

.stat-item-clickable:hover {
    background: rgba(13, 110, 253, 0.1);
    transform: scale(1.02);
}

.stat-item-clickable:active {
    transform: scale(0.98);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .action-area {
        top: 10px;
        right: 10px;
    }
    
    .action-area .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 70px 20px 20px 20px;
    }
    
    header h1 {
        font-size: 2rem !important;
    }
    
    header p {
        font-size: 1rem !important;
    }
    
    .selected-name {
        font-size: 1.8rem !important;
    }
    
    .controls .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .controls .btn {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .name-list-preview ul {
        columns: 1;
    }
    
    .stats-bottom-right {
        bottom: 15px;
        right: 15px;
        min-width: 180px;
        max-width: 240px;
    }
    
    .stats-bottom-right .card-body {
        padding: 0.75rem !important;
    }
    
    .stats-bottom-right .fs-4 {
        font-size: 1.2rem !important;
    }
    
    .file-info-bottom {
        font-size: 0.7rem;
    }
}

/* All Items Modal Overlay */
.all-items-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.all-items-modal {
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    animation: slideIn 0.3s ease;
}

.all-items-modal .card {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.all-items-modal .card-body {
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.all-items-list {
    columns: 2;
    column-gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.all-items-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #495057;
    break-inside: avoid;
    transition: all 0.2s ease;
    border-left: 3px solid #198754;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.all-items-list li:hover {
    background: #e9ecef;
}

.all-items-list li.banned {
    background: #f8d7da;
    border-left-color: #dc3545;
    opacity: 0.7;
}

.all-items-list li.banned .item-name {
    text-decoration: line-through;
    color: #721c24;
}

.all-items-list .item-name {
    flex: 1;
    word-break: break-word;
}

.ban-toggle-btn {
    padding: 4px 8px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    flex-shrink: 0;
}

.ban-toggle-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.ban-toggle-btn.banned {
    background: #28a745;
}

.ban-toggle-btn.banned:hover {
    background: #218838;
}

@media (max-width: 768px) {
    .all-items-list {
        columns: 1;
    }
}

/* Picked Items Modal Overlay */
.picked-items-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.picked-items-modal {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    animation: slideIn 0.3s ease;
}

.picked-items-modal .card {
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.picked-items-modal .card-body {
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.picked-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.picked-items-list li {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.picked-items-list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.picked-items-list .item-number {
    background: #0d6efd;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.picked-items-list .item-name {
    flex: 1;
    color: #333;
    font-weight: 500;
}

.picked-items-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.picked-items-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tablet Responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .name-list-preview ul {
        columns: 2;
    }
}