/* ===== VARIABLES ===== */
:root {
    --primary: #ff6b6b;
    --primary-dark: #ff5252;
    --secondary: #3a7bd5;
    --dark: #0f1419;
    --dark-light: #1a1f2e;
    --darker: #252b3d;
    --text: #e0e0e0;
    --text-light: #8a8f98;
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    background-image: linear-gradient(to bottom right, #0f1419, #1a1f2e);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== HEADER STYLES ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--darker);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--primary);
    font-size: 2rem;
}

h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.2rem;
}

.user-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.user-name {
    font-weight: bold;
}

/* ===== BUTTON STYLES ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text);
    border: 1px solid var(--text-light);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ===== MAIN CONTENT LAYOUT ===== */
.main-content {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
}

/* ===== CHAT STYLES ===== */
.chat-container {
    flex: 1;
    background-color: var(--dark-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.chat-header {
    background-color: var(--darker);
    padding: 15px 20px;
    border-bottom: 1px solid var(--darker);
}

.chat-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
}

.user-message {
    align-self: flex-end;
    background-color: var(--secondary);
    border-bottom-right-radius: 4px;
}

.ai-message {
    align-self: flex-start;
    background-color: var(--darker);
    border-bottom-left-radius: 4px;
}

.chat-input {
    display: flex;
    padding: 15px;
    background-color: var(--darker);
    border-top: 1px solid var(--darker);
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 24px;
    background-color: var(--dark-light);
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.chat-input button {
    margin-left: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 24px;
    background-color: var(--primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: var(--primary-dark);
}

/* ===== MOVIES STYLES ===== */
.movies-container {
    flex: 2;
    background-color: var(--dark-light);
    border-radius: 12px;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.movies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.movies-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
}

.search-box {
    display: flex;
    background-color: var(--darker);
    border-radius: 24px;
    overflow: hidden;
    padding: 5px;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: var(--text);
    outline: none;
    width: 200px;
}

.search-box button {
    background: var(--primary);
    border: none;
    padding: 8px 15px;
    color: white;
    cursor: pointer;
    border-radius: 20px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card {
    background-color: var(--darker);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.movie-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text);
}

.movie-year {
    color: var(--text-light);
    font-size: 0.9rem;
}

.movie-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.genre-tag {
    background-color: var(--secondary);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ===== RATING STYLES ===== */
.user-rating {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--darker);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rating-label {
    font-size: 0.8rem;
    color: var(--text-light);
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.star:hover {
    color: gold;
}

.star.active {
    color: gold;
}

/* ===== MOVIE BADGES ===== */
.match-score {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.recommendation-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--dark-light);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.modal-header {
    margin-bottom: 20px;
    text-align: center;
}

.modal-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--darker);
    background-color: var(--darker);
    color: var(--text);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item input {
    width: auto;
}

/* ===== FOOTER STYLES ===== */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--darker);
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
    background-color: var(--darker);
    padding: 12px 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: var(--text-light);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ===== PROFILE STYLES ===== */
/* ===== PROFILE PAGE STYLES ===== */
.profile-container {
    flex: 1;
    background-color: var(--dark-light);
    border-radius: 12px;
    padding: 30px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.profile-header {
    margin-bottom: 30px;
    text-align: center;
}

.profile-header h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-section {
    background-color: var(--darker);
    border-radius: 8px;
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h3 {
    color: var(--text);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: var(--primary);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.section-content {
    padding: 0 10px;
}

.info-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.info-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-label {
    flex: 1;
    font-weight: bold;
    color: var(--text-light);
}

.info-value {
    flex: 2;
    color: var(--text);
}

/* Danger Zone */
.danger-zone {
    border: 2px solid #ff6b6b;
}

.warning-text {
    color: #ff6b6b;
    margin-bottom: 20px;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-danger {
    background-color: #ff6b6b;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #ff5252;
}

.btn-danger i {
    margin-right: 8px;
}

/* Modal buttons */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

/* Responsive design for profile page */
@media (max-width: 768px) {
    .profile-container {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}