:root {
    --primary: #ff4d4d;
    --bg-dark: #0a0a0b;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-dim: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.search-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
}

input[type="text"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.2);
}

button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.4);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.movie-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
}

.movie-card:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-section {
    margin-top: 4rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.note-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
    transition: 0.3s;
}

.note-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
}

.note-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.note-body {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.movie-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.tag-container {
    display: flex;
    gap: 8px;
    margin-top: 5px;
}

.quality-tag {
    background: #2ecc71;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.rating-tag {
    color: #f5c518;
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.imdb-tag {
    background: #f5c518;
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

.note-content {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-top: 10px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 12px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 15px;
    transition: 0.3s;
    overflow: hidden;
}

.link-btn:hover {
    background: rgba(255, 77, 77, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.link-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dim);
    font-weight: 400;
}

.delete-btn {
    background: none;
    color: #ff4d4d;
    padding: 0;
    font-size: 0.85rem;
    opacity: 0.6;
}

.delete-btn:hover {
    opacity: 1;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

.play-btn {
    background: #2ecc71;
    padding: 0.5rem 1.2rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bulk-copy-btn {
    background: #f5c518;
    color: #000;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal for adding note */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #151517;
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
}

textarea {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: 12px;
    color: #fff;
    margin: 1rem 0;
    resize: none;
    outline: none;
}