* {
    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%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    margin-bottom: 30px;
    color: #ffffff;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-title {
    text-align: left;
    flex: 1;
}

.header-auth {
    display: flex;
    align-items: center;
    min-width: 200px;
    justify-content: flex-end;
}

#login-prompt-container {
    display: flex;
    align-items: center;
}

#login-prompt-btn {
    white-space: nowrap;
    background: #007cba;
    color: white;
    border: 2px solid #007cba;
    padding: 10px 15px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#login-prompt-btn:hover {
    background: #005a8b;
    border-color: #005a8b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #2d3748;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid #4a5568;
}

.welcome-text {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    height: auto;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .header-title {
        order: 1;
        text-align: center;
        width: 100%;
    }
    
    .header-auth {
        order: 2;
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .user-info {
        justify-content: center;
        width: auto;
        margin-top: 0;
    }
    
    #login-prompt-container {
        width: 100%;
        justify-content: center;
    }
    
    #login-prompt-btn {
        padding: 15px 25px;
        font-size: 1rem;
        border-radius: 12px;
        min-width: 250px;
    }
}

header h1 {
    font-size: 3.2rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Statistik Kacheln */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #2d3748;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid #4a5568;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4299e1, #9f7aea);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.4);
    background: #374151;
}

.stat-card.active {
    background: linear-gradient(135deg, #4299e1, #9f7aea);
    color: white;
    border-color: #4299e1;
}

.stat-icon {
    font-size: 2rem;
    margin-right: 20px;
}

/* Specific colors for each stat icon */
.stat-card[data-filter="all"] .stat-icon {
    color: #a0aec0;
}

.stat-card[data-filter="watching"] .stat-icon {
    color: #4299e1;
}

.stat-card[data-filter="completed"] .stat-icon {
    color: #48bb78;
}

.stat-card[data-filter="planned"] .stat-icon {
    color: #ed8936;
}

.stat-card[data-filter="dropped"] .stat-icon {
    color: #f56565;
}

.stat-card.active .stat-icon {
    color: white;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Steuerungsleiste */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.button-row {
    display: flex;
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* View toggle removed - using list view only */

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1, #9f7aea);
    color: white;
    height: 44px; /* Gleiche Höhe wie Suchzeile */
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
    background: #2d3748;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.btn-secondary:hover {
    background: #4299e1;
    color: white;
}

.btn-secondary.active {
    background: #4299e1;
    color: white;
}

/* Data Menu Button Styling */
#data-menu-btn {
    background: #6366f1;
    color: white;
    border: 2px solid #6366f1;
    height: 44px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 10px;
}

#data-menu-btn:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* Data Menu Modal Styling */
.data-menu-content {
    max-width: 90%;
    width: 90%;
    padding: 0;
    margin: 20px;
}

.data-menu-body {
    padding: 15px 20px;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-section h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-section p {
    color: #94a3b8;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    margin: 25px 0;
}

.menu-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    margin-top: 10px;
}

/* Import Options Styling */
.import-options {
    margin: 15px 0;
}

.option-group {
    margin-bottom: 12px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(26, 26, 46, 0.5);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: rgba(26, 26, 46, 0.7);
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background: #667eea;
    border-color: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.option-content {
    flex: 1;
}

.option-content strong {
    color: #e2e8f0;
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

.option-content small {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.3;
}

.radio-label input[type="radio"]:checked ~ .option-content strong {
    color: #667eea;
}

/* Export/Import Button Styling in Menu */
#export-excel-btn {
    background: #16a34a;
    border-color: #16a34a;
}

#export-excel-btn:hover {
    background: #15803d;
    border-color: #15803d;
    box-shadow: 0 5px 15px rgba(22, 163, 74, 0.4);
}

#import-excel-btn {
    background: #2563eb;
    border-color: #2563eb;
}

#import-excel-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* Export Success Message */
.export-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    max-width: 400px;
}

.export-success-message i {
    font-size: 1.2rem;
    color: #dcfce7;
}

/* Import Success Message */
.import-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    max-width: 400px;
}

.import-success-message i {
    font-size: 1.2rem;
    color: #dbeafe;
}

/* Error Message */
.error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #e53e3e, #f56565);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 4.7s;
    max-width: 400px;
}

.error-message i {
    font-size: 1.2rem;
    color: #fed7d7;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.search-container {
    position: relative;
    background: #1a202c;
    border-radius: 12px;
    padding: 4px;
    border: 1px solid #4a5568;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 10px 40px 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    background: transparent;
    color: #e2e8f0;
    width: 250px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container input:focus {
    outline: none;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.05);
}

.search-container input::placeholder {
    color: #a0aec0;
    transition: color 0.3s ease;
}

.search-container input:focus::placeholder {
    color: #cbd5e0;
}

.search-container i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.search-container:hover i {
    color: #cbd5e0;
}

.search-container input:focus ~ i {
    color: #9f7aea;
}

/* View toggle removed - using list view only */

/* Anime Container */
/* Grid view removed - using list view only */

.anime-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.anime-card {
    background: #2d3748;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #4a5568;
}

.anime-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: #374151;
}

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

.anime-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.anime-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
}

.edit-btn {
    background: #2563eb;
    color: white;
    border: 1px solid #1d4ed8;
}

.edit-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.delete-btn {
    background: #dc2626;
    color: white;
    border: 1px solid #b91c1c;
}

.delete-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.action-btn i {
    font-size: 1rem;
}

.anime-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #e0e0e0;
    font-weight: 500;
}

.info-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.info-item i.fa-play-circle {
    color: #4299e1;
}

.info-item i.fa-star {
    color: #fbbf24;
}

.status-badge {
    padding: 3px 6px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
    white-space: nowrap;
    width: auto;
    min-width: auto;
    max-width: none;
    text-align: center;
}

.status-watching { background: #1e3a8a; color: #60a5fa; }
.status-completed { background: #166534; color: #4ade80; }
.status-planned { background: #92400e; color: #fbbf24; }
.status-dropped { background: #991b1b; color: #f87171; }

.rating {
    display: flex;
    gap: 2px;
}

.rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.anime-notes {
    margin-top: 10px;
    padding: 10px;
    background: #1a202c;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #a0aec0;
    font-style: italic;
    border: 1px solid #2d3748;
}

/* List Header */
.list-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #374151;
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #ffffff;
    border: 1px solid #4a5568;
}

.header-column {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-name {
    flex: 2;
    min-width: 200px;
    padding: 0 15px;
}

.header-episodes {
    flex: 1;
    min-width: 120px;
    justify-content: flex-start;
    padding: 0 10px;
}

.header-rating {
    flex: 1;
    min-width: 140px;
    justify-content: flex-start;
    padding: 0 10px;
}

.header-notes {
    flex: 3;
    min-width: 200px;
    justify-content: flex-start;
    padding: 0 15px;
}

.header-actions {
    flex: 0 0 120px;
    justify-content: center;
}

/* Liste Ansicht */
.anime-list .anime-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #4a5568;
    min-height: 80px;
}

.anime-list .anime-card:last-child {
    border-bottom: none;
}

.anime-list .anime-card-name {
    flex: 2;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
    gap: 5px;
}

.anime-list .anime-card-name .status-badge {
    align-self: flex-start;
    max-width: fit-content;
    width: auto;
    min-width: auto;
    flex-shrink: 0;
}

.anime-list .anime-card-episodes {
    flex: 1;
    min-width: 120px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
}

.anime-list .anime-card-episodes i {
    color: #4299e1;
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
}

.anime-list .anime-card-episodes .episode-text {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.anime-list .anime-card-rating {
    flex: 1;
    min-width: 140px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.anime-list .anime-card-rating i {
    color: #fbbf24;
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
}

.anime-list .anime-card-rating span {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.anime-list .anime-card-notes {
    flex: 3;
    min-width: 200px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    font-size: 0.9rem;
    color: #a0aec0;
    font-style: italic;
    padding: 0 15px;
    line-height: 1.4;
}

.anime-list .anime-actions {
    flex: 0 0 120px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.anime-list .anime-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0;
}

.anime-list .status-badge {
    width: auto !important;
    min-width: auto !important;
    max-width: fit-content !important;
    flex: none !important;
    display: inline-block !important;
    align-self: flex-start !important;
}

.anime-list .anime-notes {
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
    max-width: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #2d3748;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid #4a5568;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid #4a5568;
}

.modal-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #a0aec0;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #4a5568;
    color: #ffffff;
}

form {
    padding: 25px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e0e0e0;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #4a5568;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: #1a202c;
    color: #e0e0e0;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4299e1;
}

.rating-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    font-style: italic;
}

#anime-rating {
    max-width: 120px;
}

/* Episode Progress für Modal */
#anime-current-episode {
    max-width: 120px;
}

/* Progress bar for cards */
.episode-progress-card {
    margin: 10px 0;
}

.progress-bar-container {
    position: relative;
    background: #1a202c;
    border-radius: 10px;
    height: 20px;
    border: 1px solid #4a5568;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #9f7aea);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    z-index: 1;
}

/* Mini-Fortschrittsbalken für List-View */
.episode-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    width: 80px;
}

.episode-text {
    font-size: 0.9rem;
    color: #e2e8f0;
    text-align: center;
    width: 100%;
}

.mini-progress-bar {
    width: 60px;
    height: 8px;
    background: #1a202c;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #4a5568;
}

.mini-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #9f7aea);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
}

/* Bestätigungs-Modal */
.confirm-modal-content {
    max-width: 400px;
}

.confirm-modal-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
}

.confirm-icon {
    flex-shrink: 0;
}

.confirm-icon i {
    font-size: 3rem;
    color: #f59e0b;
}

.confirm-message h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.confirm-message p {
    color: #a0aec0;
    margin-bottom: 8px;
    line-height: 1.5;
}

.confirm-warning {
    font-size: 0.9rem;
    color: #f87171 !important;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #4a5568;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: 1px solid #b91c1c;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

/* Leere Liste */
.empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-message h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-message p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.empty-message .btn {
    margin-top: 20px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* PWA Install Button */
.install-btn {
    background: linear-gradient(135deg, #4299e1, #9f7aea) !important;
    color: white !important;
    border: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    animation: pulse 2s infinite;
}

.install-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.4) !important;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6); }
    100% { box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); }
}

/* Mobile-First Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .header-title {
        order: 1;
        text-align: center;
        width: 100%;
    }
    
    .header-title h1 {
        font-size: 2.5rem !important;
        margin-bottom: 15px;
    }
    
    .header-auth {
        order: 2;
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .user-info {
        justify-content: center;
        width: auto;
        margin-top: 0;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    #login-prompt-container {
        width: 100%;
        justify-content: center;
    }
    
    #login-prompt-btn {
        padding: 18px 30px;
        font-size: 1.1rem;
        border-radius: 15px;
        min-width: 280px;
        font-weight: 600;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card:first-child {
        grid-column: span 1;
    }
    
    .stat-card {
        padding: 20px;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 1.8rem;
        margin-right: 15px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .left-controls {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .button-row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }
    
    #add-anime-btn,
    #data-menu-btn {
        flex: 1;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
        min-width: auto;
    }
    
    /* View toggle removed */
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .data-menu-content {
        margin: 15px;
        width: calc(100% - 30px);
        padding: 0;
    }
    
    .data-menu-body {
        padding: 20px;
    }
    
    .anime-list .anime-card {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .list-header {
        display: none !important;
    }
    
    .anime-list .anime-card-name,
    .anime-list .anime-card-episodes,
    .anime-list .anime-card-rating,
    .anime-list .anime-card-notes {
        flex: none;
        width: 100%;
        min-width: auto;
        padding: 0;
        text-align: left;
    }
    
    .anime-list .anime-actions {
        flex: none;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    /* Header Mobile Layout */
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .header-title {
        order: 1;
        text-align: center;
        width: 100%;
    }
    
    .header-title h1 {
        font-size: 2.8rem !important;
        margin-bottom: 10px;
    }
    
    .header-auth {
        order: 2;
        width: 100%;
        justify-content: center;
        min-width: auto;
    }
    
    .user-info {
        justify-content: center;
        width: auto;
        margin-top: 0;
    }
    
    #login-prompt-container {
        width: 100%;
        justify-content: center;
    }
    
    #login-prompt-btn {
        padding: 15px 25px;
        font-size: 1rem;
        border-radius: 12px;
        min-width: 250px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card:first-child {
        grid-column: span 2;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .left-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .button-row {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
    }
    
    #add-anime-btn,
    #data-menu-btn {
        flex: 1;
    }
    
    .right-controls {
        display: none;
    }
    
    .search-container input {
        width: 200px;
    }
    
    /* Grid view removed */
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .anime-list .anime-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .anime-list .anime-info {
        flex-direction: column;
        gap: 10px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .action-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
    }
    
    .stat-card {
        min-height: 60px;
    }
    
    input, select, textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .search-container input {
        min-height: 44px;
        font-size: 16px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Grid view removed */
    
    .modal-content {
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .stat-icon {
        transform: translateZ(0);
    }
    
    .action-btn i {
        transform: translateZ(0);
    }
}
