/* Smart Ranking System - Main Styles */

/* Reset and base styles - only apply when NOT using dashboard */
:not(.dashboard-page) * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Dashboard gets its own reset */
.dashboard-page * {
    box-sizing: border-box;
}

/* Original ranking system styles - only apply to non-dashboard pages */
body:not(.dashboard-body) {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Dashboard body gets different styling */
body.dashboard-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f9fafb;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container styles for ranking pages */
.ranking-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Ranking page specific styles */
.ranking-page h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stage-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.stage-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #7f8c8d;
    transition: all 0.3s;
}

.stage-dot.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.2);
}

.stage-dot.completed {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.main-content:not(.dashboard-content) {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Button styles for ranking pages */
.ranking-page .btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-page .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.ranking-page .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Panel styles for ranking pages */
.ranking-page .panel {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    width: 100%;
    max-width: 800px;
    margin-bottom: 20px;
}

.ranking-page .panel h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 600;
}

.ranking-page input[type="text"],
.ranking-page input[type="file"],
.ranking-page textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.ranking-page input[type="text"]:focus,
.ranking-page textarea:focus {
    outline: none;
    border-color: #667eea;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.item-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
    text-align: center;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.item-name {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #2c3e50;
}

.item-description {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.action-btn.bad {
    background: #e74c3c;
    color: white;
}

.action-btn:hover {
    transform: scale(1.05);
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ranking-container {
        padding: 15px;
    }

    .ranking-page h1 {
        font-size: 2em;
    }

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