* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

header {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.input-section {
    padding: 30px;
    background: white;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: end;
    justify-content: center;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.input-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.randomize-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    min-width: 180px;
}

.randomize-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.randomize-btn:active {
    transform: translateY(0);
}

.results-section {
    padding: 30px;
    background: #f8f9fa;
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.ranked-list-section {
    margin-bottom: 30px;
}

.ranked-list-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.4rem;
    text-align: center;
}

.ranked-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


.rank-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rank-item.special {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-left-color: #667eea;
}

.rank-item.normal {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-left-color: #667eea;
}

.rank-number {
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    min-width: 40px;
    text-align: center;
    margin-right: 16px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 8px;
}

.list-number {
    font-weight: 600;
    font-size: 1.3rem;
    color: #333;
}

.info-panel {
    background: #667eea;
    color: white;
    padding: 25px 30px;
}

.info-panel h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.info-panel ul {
    list-style: none;
    padding-left: 0;
}

.info-panel li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-panel li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #feca57;
    font-weight: bold;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .input-section {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    
    .rank-item {
        padding: 10px 12px;
    }
    
    .rank-number {
        min-width: 35px;
        font-size: 1rem;
        padding: 6px 10px;
        margin-right: 12px;
    }
    
    .list-number {
        font-size: 1.1rem;
    }
}
