/*!
 * GameRanking Common Styles
 * Gemeinsame CSS-Klassen für alle Templates
 * ===========================================
 */

/* Base Reset & Typography */
* {
    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;
}

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

/* Header Styles */
.header {
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header.primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

.header.danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.header.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><radialGradient id="a" cx="50%" cy="40%"><stop offset="0%" stop-color="%23fff" stop-opacity=".1"/><stop offset="100%" stop-color="%23fff" stop-opacity="0"/></radialGradient></defs><rect width="100" height="20" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.header p {
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

/* Content Areas */
.content, .form-container {
    padding: 40px;
}

/* Form Elements */
.name-input-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0ea5e9;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.name-input-container label {
    display: block;
    font-weight: 700;
    color: #0c4a6e;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.name-input-container input {
    width: 100%;
    padding: 15px;
    border: 2px solid #0ea5e9;
    border-radius: 10px;
    font-size: 1.1rem;
    background: white;
    transition: all 0.3s ease;
}

.name-input-container input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Grid Systems */
.games-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.game-container {
    background: white;
    border: 2px solid #f3f4f6;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
}

.game-container:hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.game-container::before {
    content: '🎲';
    position: absolute;
    left: -10px;
    top: -10px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.game-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.1rem;
    flex: 1;
    margin-left: 10px;
}

/* Form Controls */
select, input[type="text"] {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select option[disabled] {
    display: none;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 18px 40px;
    font-size: 1.2rem;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

/* Submit Container */
.submit-container {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
}

/* Links */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #4f46e5;
}

/* List Sections */
.list-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.list-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 20px 25px;
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* User Entries */
.user-entries {
    padding: 25px;
}

.user-entry {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.user-entry:hover {
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Rankings Display */
.rankings-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.ranking-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.ranking-item:hover {
    border-color: #4f46e5;
    transform: scale(1.02);
}

.rank-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 5px;
}

.rank-game {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.message.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
}

.message.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #dc2626;
}

.message.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 2px solid #3b82f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .content, .form-container {
        padding: 20px;
    }

    .game-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .game-name {
        margin-left: 0;
    }

    .user-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .rankings-display {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
    }

    .btn {
        padding: 15px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .content, .form-container {
        padding: 15px;
    }

    .rankings-display {
        grid-template-columns: 1fr;
    }
}
