/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --bg-color: #ecf0f1;
    --text-color: #333;
    --light-color: #f5f5f5;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/anime-pattern.png') repeat;
    opacity: 0.05;
    z-index: 1;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    animation: pulse 15s infinite alternate;
    z-index: 2;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

.login-form {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 350px;
    text-align: center;
    position: relative;
    z-index: 10;
    animation: fadeIn 0.8s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.login-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    filter: drop-shadow(0px 0px 5px rgba(52, 152, 219, 0.7));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}

.login-form h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.login-form h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: normal;
    font-size: 1.1rem;
    opacity: 0.8;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 13px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.input-group input:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.input-group input:focus + i {
    color: var(--secondary-color);
}

.login-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.error-message {
    color: var(--danger-color);
    margin-bottom: 1.2rem;
    background-color: rgba(250, 219, 216, 0.8);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid var(--danger-color);
}

.links {
    margin-top: 1.2rem;
    font-size: 14px;
    color: #777;
    line-height: 1.5;
}

.links p:first-child {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

.logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    filter: drop-shadow(0px 0px 5px rgba(52, 152, 219, 0.7));
}

.logo h2 {
    color: white;
}

.logo span {
    color: var(--secondary-color);
}

.menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.menu-item:hover,
.menu-item.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.header h1 {
    color: var(--primary-color);
}

.user-info {
    display: flex;
    align-items: center;
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-info span {
    color: var(--primary-color);
    font-weight: bold;
}

.user-info a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.user-info a:hover {
    opacity: 0.8;
}

/* User Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.dropdown-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 12px;
    color: #777;
    transition: transform 0.3s;
}

.dropdown-toggle.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    color: var(--text-color);
    transition: background-color 0.3s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 8px 0;
}

/* Dashboard Cards */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.card-header h3 {
    color: var(--primary-color);
}

.card-header i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.card-stat {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.card-desc {
    color: #777;
    font-size: 0.9rem;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Tables */
.table-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

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

.table-header h3 {
    color: var(--primary-color);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
}

.btn i {
    margin-right: 5px;
}

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

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

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

.btn-danger:hover {
    background-color: #c0392b;
}

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

.btn-success:hover {
    background-color: #27ae60;
}

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

.btn-warning:hover {
    background-color: #d35400;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
}

table tr:hover {
    background-color: #f8f9fa;
}

table img {
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

/* Anime Search Page */
.search-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.anime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.anime-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.anime-card:hover {
    transform: translateY(-5px);
}

.anime-card-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.anime-card-body {
    padding: 15px;
}

.anime-card-title {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
}

.anime-card-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 10px;
}

.anime-card-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--warning-color);
}

.anime-card-actions {
    display: flex;
    justify-content: center;
}

.anime-card-actions .btn {
    width: 100%;
}

/* Add Anime Options */
.add-options {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.add-option {
    flex: 1;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: border-color 0.3s;
}

.add-option:hover {
    border-color: var(--secondary-color);
}

.add-option h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.add-option p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--secondary-color);
    outline: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    color: var(--primary-color);
}

.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: #777;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination .page-item {
    margin: 0 5px;
}

.pagination .page-link {
    display: block;
    padding: 8px 12px;
    background-color: white;
    color: var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

.pagination .page-link:hover,
.pagination .page-link.active {
    background-color: var(--secondary-color);
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .add-options {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo h2, .menu-item span {
        display: none;
    }
    
    .menu-item {
        justify-content: center;
    }
    
    .menu-item i {
        margin-right: 0;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-info {
        margin-top: 10px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Login Page Background Particles */
.login-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    overflow: hidden;
}

.login-particles::before,
.login-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.login-particles::before {
    background: radial-gradient(circle at 15% 35%, rgba(52, 152, 219, 0.1) 0%, rgba(0, 0, 0, 0) 25%),
                radial-gradient(circle at 85% 65%, rgba(52, 152, 219, 0.1) 0%, rgba(0, 0, 0, 0) 25%);
}

/* Add star-like dots */
.login-particles::after {
    background-image: 
        radial-gradient(circle at 25% 25%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 75% 55%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 35% 85%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 15% 45%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 65% 35%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 85% 75%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 45% 5%, white 0%, white 0.1%, transparent 0.1%),
        radial-gradient(circle at 5% 95%, white 0%, white 0.1%, transparent 0.1%);
    opacity: 0.4;
    animation: twinkling 8s infinite linear;
}

@keyframes twinkling {
    0% {
        transform: scale(1);
        opacity: 0.2;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

/* Individual Particles */
.particle {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    animation: float-particle 15s linear infinite;
}

@keyframes float-particle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
} 