/**
 * Anime Characters Directory - Frontend Styles
 */

/* Archive Page Styles */
.acd-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
	width:100%;
}

.acd-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.acd-archive-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
}

.acd-archive-description {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 30px 0;
}

/* Search and Filter Controls - Dark Mode */
.acd-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.acd-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.acd-search-box input {
    padding: 10px 50px 10px 20px;
    border: 2px solid #404040;
    border-radius: 25px;
    font-size: 1rem;
    width: 320px;
    background: #2a2a2a;
    color: #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-family: inherit;
}

.acd-search-box input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), 0 4px 20px rgba(0, 0, 0, 0.3);
    background: #333;
}

.acd-search-box input::placeholder {
    color: #888;
    font-style: italic;
}

.acd-search-icon {
    position: absolute;
    right: 20px;
    color: #6366f1;
    pointer-events: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.acd-search-box input:focus + .acd-search-icon {
    color: #8b5cf6;
}

.acd-clear-search {
    position: absolute;
    right: 50px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.acd-clear-search:hover {
    background: #ef4444;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.acd-sort-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.acd-sort-controls label {
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acd-sort-controls select {
    padding: 10px 20px;
    border: 2px solid #404040;
    border-radius: 15px;
    font-size: 1rem;
    background: #333;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    min-width: 140px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

.acd-sort-controls select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: #404040;
}

.acd-sort-controls select:hover {
    border-color: #555;
    background: #404040;
}

/* No Results Message - Dark Mode */
.acd-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.acd-no-results h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.acd-no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Characters Grid */
.acd-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.acd-character-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

.acd-character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.acd-character-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.acd-character-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #1a1a1a;
}

.acd-character-thumbnail {
    width: 100%!important;
    height: 100%!important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.acd-character-card:hover .acd-character-thumbnail {
    transform: scale(1.05);
}

.acd-character-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.acd-character-placeholder .dashicons {
    font-size: 4rem;
}

.acd-character-info {
    padding: 20px;
}

.acd-character-name {
    font-size: 1.3rem;
    margin: 0 0 8px 0;
    color: #e0e0e0;
    font-weight: 600;
}

.acd-character-role {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Characters State - Dark Mode */
.acd-no-characters {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 16px;
    margin: 20px 0;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.acd-no-characters h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #e0e0e0;
}

/* Single Character Page Styles */
.acd-single-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
	display: flex;
}

.acd-character-single {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
	width: 100%;
}

.acd-character-header {
    display: flex;
    gap: 40px;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.acd-character-image-large {
    flex: 0 0 300px;
}

.acd-character-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.acd-character-placeholder-large {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.acd-character-placeholder-large .dashicons {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.5);
}

.acd-character-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.acd-character-title {
    font-size: 3rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.acd-character-meta {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acd-meta-label {
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 100px;
}

.acd-meta-value {
    font-size: 1.1rem;
    opacity: 0.9;
}

.acd-character-content {
    padding: 40px;
    line-height: 1.6;
    color: #333;
}

.acd-character-content h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.acd-character-content h4 {
    color: #764ba2;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.acd-character-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.acd-character-footer {
    padding: 20px 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.acd-back-link {
    display: inline-flex;
    align-items: center;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.acd-back-link:hover {
    color: #764ba2;
}

/* Pagination Styles */
.acd-characters-grid + .wp-pagination {
    text-align: center;
    margin-top: 40px;
}

.wp-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wp-pagination .page-numbers:hover,
.wp-pagination .page-numbers.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .acd-controls {
        flex-direction: column;
        gap: 25px;
        padding: 12px;
        border-radius: 15px;
    }
    
    .acd-search-box input {
        width: 280px;
        padding: 8px 45px 8px 18px;
        font-size: 0.95rem;
    }
    
    .acd-sort-controls {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        text-align: center;
    }
    
    .acd-sort-controls select {
        min-width: 160px;
    }
    
    .acd-characters-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .acd-character-header {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .acd-character-image-large {
        flex: none;
    }
    
    .acd-character-main-image,
    .acd-character-placeholder-large {
        height: 300px;
    }
    
    .acd-character-title {
        font-size: 2rem;
    }
    
    .acd-character-content {
        padding: 20px;
    }
    
    .acd-character-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .acd-archive-container,
    .acd-single-container {
        padding: 10px;
    }
    
    .acd-controls {
        padding: 10px;
        border-radius: 12px;
    }
    
    .acd-search-box input {
        width: 250px;
        font-size: 0.9rem;
        padding: 7px 40px 7px 15px;
    }
    
    .acd-sort-controls {
        padding: 12px;
    }
    
    .acd-sort-controls select {
        min-width: 140px;
        padding: 7px 35px 7px 15px;
        font-size: 0.9rem;
    }
    
    .acd-characters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .acd-character-image {
        height: 250px;
    }
    
    .acd-character-title {
        font-size: 1.5rem;
    }
    
    .acd-character-header {
        padding: 15px;
    }
    
    .acd-character-content {
        padding: 15px;
    }
}

/* Loading States */
.acd-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Admin Styles */
.acd-settings-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.acd-results {
    margin-top: 20px;
}

.acd-results .notice {
    margin: 10px 0;
    padding: 12px;
    border-radius: 4px;
}

.acd-results .notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.acd-results .notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}