* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.logo-icon {
    font-size: 24px;
    color: white;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.free-tag {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.menu-icon {
    font-size: 18px;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e0e4e7;
    padding: 0;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-item.active {
    background: #e3f2fd;
    border-left-color: #2196F3;
}

.nav-item.active .nav-title {
    color: #2196F3;
}

.nav-icon {
    font-size: 20px;
    color: #666;
    margin-right: 15px;
    width: 20px;
}

.nav-text {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.nav-subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Content */
.content {
    flex: 1;
    padding: 30px;
    max-width: 700px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-section {
    max-width: 600px;
}

#cardInput {
    width: 100%;
    height: 200px;
    padding: 20px;
    border: 2px solid #e0e4e7;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    background: white;
    transition: border-color 0.3s ease;
}

#cardInput:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.input-help {
    margin: 10px 0 20px;
    color: #666;
    font-size: 14px;
}

.check-btn, .premium-btn, .generate-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.check-btn {
    background: linear-gradient(135deg, #26C6DA, #00ACC1);
    color: white;
}

.check-btn:hover {
    background: linear-gradient(135deg, #00ACC1, #0097A7);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(38, 198, 218, 0.3);
}

.premium-btn {
    background: white;
    color: #2196F3;
    border: 2px solid #2196F3;
}

.premium-btn:hover {
    background: #2196F3;
    color: white;
}

.generate-btn {
    background: linear-gradient(135deg, #4CAF50, #45A049);
    color: white;
}

.generate-btn:hover {
    background: linear-gradient(135deg, #45A049, #3E8E41);
    transform: translateY(-1px);
}

/* Generator Section */
.generate-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.generator-options {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.generator-options select,
.generator-options input {
    padding: 10px;
    border: 2px solid #e0e4e7;
    border-radius: 6px;
    font-size: 14px;
}

.generator-options select {
    flex: 1;
    min-width: 150px;
}

.generator-options input {
    width: 150px;
}

#generatedCards {
    width: 100%;
    height: 250px;
    padding: 15px;
    border: 2px solid #e0e4e7;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    resize: vertical;
}

/* Results Sidebar */
.results-sidebar {
    width: 320px;
    background: white;
    border-left: 1px solid #e0e4e7;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-box {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    gap: 10px;
}

.result-box.live {
    background: linear-gradient(135deg, #4CAF50, #45A049);
}

.result-box.unknown {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.result-box.die {
    background: linear-gradient(135deg, #F44336, #D32F2F);
}

.result-text {
    flex: 1;
    font-size: 16px;
}

.result-count {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 14px;
    min-width: 30px;
    text-align: center;
}

.results-area {
    flex: 1;
    border-top: 1px solid #e0e4e7;
    padding-top: 20px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.results-header h3 {
    color: #333;
    font-size: 18px;
}

.clear-btn, .export-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #f44336;
    color: white;
    border-color: #f44336;
}

.export-btn:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.results-list {
    max-height: 400px;
    overflow-y: auto;
}

.result-item {
    padding: 12px;
    border: 1px solid #e0e4e7;
    border-radius: 6px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    position: relative;
}

.result-item.live {
    background: #e8f5e8;
    border-color: #4CAF50;
}

.result-item.unknown {
    background: #fff3e0;
    border-color: #FF9800;
}

.result-item.die {
    background: #ffebee;
    border-color: #f44336;
}

.result-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    color: white;
}

.result-status.live {
    background: #4CAF50;
}

.result-status.unknown {
    background: #FF9800;
}

.result-status.die {
    background: #f44336;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e4e7;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196F3, #1976D2);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .nav-menu {
        display: flex;
        padding: 10px;
        overflow-x: auto;
    }
    
    .nav-item {
        white-space: nowrap;
        min-width: 150px;
    }
    
    .results-sidebar {
        width: 100%;
        order: 3;
    }
    
    .content {
        order: 2;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .results-sidebar {
        padding: 15px;
    }
    
    .generator-options {
        flex-direction: column;
    }
    
    .generator-options select,
    .generator-options input {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-content {
        width: 90%;
        margin: 20px;
    }
}

/* Scrollbar Styling */
.results-list::-webkit-scrollbar {
    width: 6px;
}

.results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.results-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animation for result items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    animation: slideIn 0.3s ease;
}