/* IMDb Free Frontend Styles - Version 1.0 */
.imdb-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
}

/* Card Layout */
.imdb-card {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eaeaea;
}

.imdb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.imdb-poster {
    flex: 0 0 220px;
    min-height: 330px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.imdb-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.imdb-card:hover .imdb-poster img {
    transform: scale(1.05);
}

.imdb-poster-rating {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: #f5c518;
    padding: 6px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(245, 197, 24, 0.3);
}

.imdb-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.imdb-header {
    margin-bottom: 18px;
}

.imdb-title {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.imdb-year {
    font-weight: normal;
    color: #666;
    font-size: 22px;
    margin-left: 4px;
}

.imdb-original-title {
    color: #666;
    font-size: 15px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.imdb-label {
    color: #888;
    font-weight: 500;
    font-size: 14px;
}

.imdb-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.imdb-rating-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f5c518 0%, #e6b400 100%);
    color: #000;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 17px;
    box-shadow: 0 3px 8px rgba(245, 197, 24, 0.3);
    transition: transform 0.2s ease;
}

.imdb-rating-badge:hover {
    transform: scale(1.05);
}

.imdb-rating-star {
    margin-right: 6px;
    font-size: 20px;
}

.imdb-rating-value {
    margin-right: 3px;
    font-size: 18px;
}

.imdb-rating-total {
    font-size: 13px;
    opacity: 0.9;
}

.imdb-age-rating {
    background: #f0f4f8;
    color: #2d3748;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
}

.imdb-duration {
    color: #4a5568;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.imdb-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.imdb-genre {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.imdb-genre:hover {
    background: #bbdefb;
    transform: translateY(-1px);
}

.imdb-director,
.imdb-cast {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    gap: 8px;
}

.imdb-cast-names {
    color: #2d3748;
    flex: 1;
}

.imdb-more-actors {
    color: #718096;
    cursor: help;
    font-style: italic;
    position: relative;
}

.imdb-more-actors:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2d3748;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
}

.imdb-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
    flex: 1;
}

.imdb-summary p {
    margin: 0;
    color: #4a5568;
    line-height: 1.7;
    font-size: 15px;
}

.imdb-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.imdb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3182ce;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.imdb-link:hover {
    color: #2c5282;
    gap: 8px;
}

/* Simple Layout */
.imdb-simple {
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 5px solid #f5c518;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
}

.imdb-simple:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left-color: #e6b400;
}

.imdb-simple-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.imdb-title-simple {
    margin: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.imdb-year-simple {
    color: #718096;
    font-size: 16px;
}

.imdb-meta-simple {
    color: #4a5568;
    font-size: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.imdb-rating-simple {
    color: #f5c518;
    font-weight: bold;
    font-size: 16px;
}

.imdb-age-simple,
.imdb-duration-simple {
    color: #718096;
}

.imdb-director-simple {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 12px;
    display: flex;
    gap: 6px;
}

.imdb-summary-simple {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

.imdb-summary-simple p {
    margin: 0;
}

/* Minimal Layout */
.imdb-minimal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.imdb-minimal:hover {
    border-color: #f5c518;
    box-shadow: 0 4px 12px rgba(245, 197, 24, 0.15);
    transform: translateY(-1px);
}

.imdb-minimal-title {
    font-weight: 600;
    color: #2d3748;
}

.imdb-minimal-rating {
    color: #f5c518;
    font-weight: bold;
}

/* Table Layout */
.imdb-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.imdb-table th {
    background: #f7fafc;
    color: #2d3748;
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    border-bottom: 2px solid #e2e8f0;
    width: 30%;
}

.imdb-table td {
    padding: 16px 20px;
    color: #4a5568;
    border-bottom: 1px solid #edf2f7;
}

.imdb-table tr:last-child td {
    border-bottom: none;
}

.imdb-table tr:hover td {
    background: #f8fafc;
}

/* Rating Shortcode */
.imdb-rating {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.imdb-rating-small {
    font-size: 14px;
}

.imdb-rating-medium {
    font-size: 16px;
}

.imdb-rating-large {
    font-size: 18px;
}

.imdb-rating-label {
    color: #718096;
    font-weight: 500;
    font-size: 0.9em;
}

.imdb-rating-value {
    font-weight: bold;
    transition: transform 0.2s ease;
}

.imdb-rating:hover .imdb-rating-value {
    transform: scale(1.1);
}

.imdb-stars {
    letter-spacing: 1px;
    transition: transform 0.2s ease;
}

.imdb-rating:hover .imdb-stars {
    transform: scale(1.1);
}

/* Cast Shortcode */
.imdb-cast-container {
    margin: 15px 0;
}

.imdb-cast-title {
    margin: 0 0 15px 0;
    color: #2d3748;
    font-size: 18px;
    font-weight: 600;
}

.imdb-cast-inline {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.imdb-cast-grid {
    display: grid;
    gap: 12px;
}

.imdb-cast-item {
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.imdb-cast-item:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.imdb-cast-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.imdb-cast-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 14px;
    transition: all 0.2s ease;
}

.imdb-cast-list li:last-child {
    border-bottom: none;
}

.imdb-cast-list li:hover {
    color: #2d3748;
    padding-left: 10px;
    background: #f8fafc;
}

.imdb-cast-list li::before {
    content: "•";
    color: #f5c518;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Error Message */
.imdb-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fed7d7;
    border: 1px solid #fc8181;
    border-radius: 8px;
    color: #c53030;
    margin: 15px 0;
    animation: fadeIn 0.3s ease;
}

.imdb-error .dashicons {
    color: #c53030;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.imdb-error-text {
    flex: 1;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .imdb-card {
        flex-direction: column;
    }
    
    .imdb-poster {
        flex: none;
        height: 400px;
    }
    
    .imdb-poster img {
        object-fit: cover;
    }
    
    .imdb-cast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .imdb-title {
        font-size: 22px;
    }
    
    .imdb-year {
        font-size: 19px;
    }
    
    .imdb-poster {
        height: 350px;
    }
    
    .imdb-content {
        padding: 20px;
    }
    
    .imdb-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .imdb-cast-grid {
        grid-template-columns: 1fr;
    }
    
    .imdb-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .imdb-poster {
        height: 300px;
    }
    
    .imdb-title {
        font-size: 20px;
    }
    
    .imdb-rating-badge {
        font-size: 15px;
        padding: 6px 12px;
    }
    
    .imdb-genres {
        gap: 6px;
    }
    
    .imdb-genre {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .imdb-simple {
        padding: 16px;
    }
    
    .imdb-title-simple {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .imdb-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .imdb-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .imdb-link {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .imdb-card {
        border: 2px solid #000;
    }
    
    .imdb-rating-badge {
        border: 1px solid #000;
    }
    
    .imdb-error {
        border: 2px solid #c00;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .imdb-card,
    .imdb-card:hover,
    .imdb-poster img,
    .imdb-card:hover .imdb-poster img,
    .imdb-rating-badge,
    .imdb-rating-badge:hover,
    .imdb-genre,
    .imdb-genre:hover,
    .imdb-minimal,
    .imdb-minimal:hover,
    .imdb-cast-item,
    .imdb-cast-item:hover,
    .imdb-cast-list li,
    .imdb-cast-list li:hover,
    .imdb-rating:hover .imdb-rating-value,
    .imdb-rating:hover .imdb-stars {
        transition: none;
        transform: none;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}