:root {
    --primary-color: #ff4b6e;
    --secondary-color: #4a90e2;
    --background-color: #1a1a2e;
    --surface-color: #242439;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    position: relative;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    margin: 0 auto;
}

.screen {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.3s forwards;
}

.hidden {
    display: none !important;
}

/* Welcome Screen */
.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.logo h1 {
    font-size: 2.5em;
    margin: 10px 0;
}

.tagline {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.mode-selection {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.mode-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mode-btn i {
    font-size: 2em;
    color: var(--text-secondary);
}

.mode-btn span {
    font-size: 1.2em;
    font-weight: bold;
}

.mode-btn small {
    color: var(--text-secondary);
}

.mode-btn:hover, .mode-btn.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.mode-btn.active i {
    color: var(--primary-color);
}

/* Genre selection */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 10px 0;
}

.input-group label {
    position: absolute;
    left: 10px;
    z-index: 10;
    color: var(--primary-color);
    pointer-events: none;
}

select,
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 15px 15px 50px; /* espaço pro ícone */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1em;
    min-height: 50px;
    box-sizing: border-box;
    width: 100%;
}

/* Focous */
.select2-container--default .select2-selection--multiple:focus,
.select2-container--default .select2-selection--multiple.select2-selection--focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Chips */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: var(--primary-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 4px 10px;
    margin: 3px 5px 3px 0;
    font-size: 0.9em;
    border: none;
}

.select2-selection__choice__remove {
    color: var(--text-primary) !important;
    margin-right: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* Select */
.select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    padding: 0;
    margin: 0;
}

/* Research */
.select2-container--default .select2-selection--multiple .select2-search__field {
    background: transparent;
    color: var(--primary-color);
    border: none;
    outline: none;
    flex: 1;
    padding-left: 4px;
    padding-right: 4px;
    min-width: 100px;
}

/* Dropdown*/
.select2-container--default .select2-dropdown {
    background-color: #2d2d41;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    color: var(--primary-color);
    overflow: hidden;
}

.select2-container--default .select2-results__option {
    padding: 10px;
    font-size: 1em;
}

/* Hover */
.select2-results__option--highlighted.select2-results__option--selectable {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1em;
}

.input-group input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
}

.primary-btn, .secondary-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.primary-btn:hover {
    background: #ff3356;
    transform: translateY(-2px);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.special-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.special-btn:hover {
    background: #ff3356;
    transform: translateY(-2px);
}

#continue-btn i.fas {
    color: white;
    font-size: 1.2em;
    margin: 0;
    line-height: 1;
    position: relative;
    top: -1.2px;
    display: inline-block;
    animation: moveHorizontal 1s infinite;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    padding: 10px 15px;
    font-size: 0.9em;
    border-radius: 8px;
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: #ff3356;
    transform: translateY(-2px);
}

/* Online mode */
.room-code-display {
    text-align: center;
    margin: 20px 0;
    font-size: 1.5em;
}

.room-code {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.player-indicator {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

.input-group input.invalid {
    border-color: #ff6b6b;
    animation: shake 0.5s;
}

.input-group input.valid {
    border-color: #4caf50;
}

/* Movie Card */
.movie-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.movie-poster {
    width: 100%;
    height: auto;
    object-fit: contain;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.movie-info {
    padding: 20px;
}

.movie-info h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.movie-info p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
}

.movie-details {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
}

/* Swipe Buttons */
.swipe-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.swipe-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#like-p1, #like-p2 {
    background: var(--primary-color);
    color: white;
}

#dislike-p1, #dislike-p2 {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.swipe-btn:hover {
    transform: scale(1.1);
}

/* Match Screen */
#match-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.match-animation {
    text-align: center;
    margin-bottom: 30px;
    animation: bounce 1s infinite;
}

.match-animation i {
    font-size: 2em;
    color: var(--primary-color);
}

.match-animation h2 {
    font-size: 2em;
    margin: 15px 0;
}

.matched-movie {
    text-align: center;
    margin-bottom: 30px;
}

.matched-movie img {
    width: 200px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.matched-movie h3 {
    font-size: 1.5em;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

@keyframes moveHorizontal {
    0%, 100% {
        transform: translateX(0); /* Posição original */
    }
    50% {
        transform: translateX(5px); /* Move 5px para a direita */
    }
}

/* Player Header */
.player-header {
    text-align: center;
    margin-bottom: 20px;
}

.player-header h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.privacy-notice {
    color: var(--text-secondary);
    font-size: 0.9em;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    display: inline-block;
}

/* Switch Player Screen */
.switch-player-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.switch-player-content {
    text-align: center;
    padding: 40px;
}

.switch-player-content i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.switch-player-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.switch-player-content p {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.switch-player-content #next-player {
    color: var(--primary-color);
    font-weight: bold;
}

/* Error */

.error-message {
    color: #ff6b6b;
    text-align: center;
    margin: 10px 0;
    font-size: 0.9em;
    animation: fadeIn 0.3s forwards;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}