/* På Spåret TV-app styling */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Skärmar */
.screen {
    display: none;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typografi */
h1 {
    font-size: 4rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

h2 {
    font-size: 2.5rem;
    color: #87ceeb;
    margin-bottom: 30px;
}

h3 {
    font-size: 1.8rem;
    color: #ffd700;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.5rem;
    color: #87ceeb;
    margin-bottom: 40px;
}

/* Knappar */
.btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    color: white;
}

/* Spelinformation */
.game-info {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

#qr-code {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

#qr-code canvas {
    border: 5px solid #ffd700;
    border-radius: 10px;
}

.join-instruction {
    font-size: 1.2rem;
    color: #87ceeb;
    line-height: 1.6;
}

/* Spelare */
.players-section {
    margin-bottom: 40px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.player-card {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.player-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.player-score {
    font-size: 2rem;
    color: #ffd700;
    font-weight: bold;
}

/* Spelområde */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.round-info {
    font-size: 1.5rem;
    color: #87ceeb;
}

.question-area {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.location-title {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 30px;
    font-weight: bold;
}

/* Bildcontainer */
.question-image {
    margin: 20px 0;
    text-align: center;
}

.question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.clue-container {
    position: relative;
    margin-bottom: 30px;
}

.clue-text {
    font-size: 1.8rem;
    line-height: 1.6;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.clue-number {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #ffd700;
    color: #1a1a2e;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Timer */
.timer {
    position: relative;
    background: rgba(0,0,0,0.3);
    border-radius: 25px;
    height: 50px;
    overflow: hidden;
    margin-bottom: 20px;
}

.timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #FFC107, #f44336);
    transition: width 1s linear;
    border-radius: 25px;
}

#timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Poängtavla */
.scoreboard {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.scoreboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.3);
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.3rem;
}

.score-item.winner {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    font-weight: bold;
}

.score-name {
    flex: 1;
    text-align: left;
}

.score-points {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Kontroller */
.controls {
    margin-top: 40px;
}

/* Meddelanden */
.messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 10px;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.message.success {
    border-left: 5px solid #4CAF50;
}

.message.error {
    border-left: 5px solid #f44336;
}

.message.info {
    border-left: 5px solid #2196F3;
}

/* Resultatskärm */
.final-results {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.final-position {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-size: 1.5rem;
}

.final-position:nth-child(1) {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1a1a2e;
    font-weight: bold;
    font-size: 2rem;
}

.final-position:nth-child(2) {
    background: linear-gradient(45deg, #c0c0c0, #e8e8e8);
    color: #1a1a2e;
    font-weight: bold;
}

.final-position:nth-child(3) {
    background: linear-gradient(45deg, #cd7f32, #daa520);
    color: white;
    font-weight: bold;
}

.final-position:nth-child(n+4) {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* Hjälpklasser */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Responsiv design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .game-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .clue-text {
        font-size: 1.4rem;
        padding: 20px;
    }
    
    .players-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
} 