/* Specialty styles for Image Converter */

.container.wider {
    max-width: 1200px;
}

.back-nav {
    align-self: flex-start;
    margin-bottom: 2rem;
}

.back-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-nav a:hover {
    color: white;
}

.upload-area {
    background: rgba(40, 40, 40, 0.4);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 4rem 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(60, 60, 60, 0.6);
    border-color: var(--text-secondary);
    transform: scale(1.01);
}

.upload-content {
    text-align: center;
}

.upload-content .icon.big {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.upload-content span {
    color: white;
    text-decoration: underline;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease-out;
}

.controls-bar.hidden {
    display: none;
}

.format-select {
    display: flex;
    align-items: center;
    gap: 1rem;
}

select {
    background: #2a2a2a;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
}

.primary-btn, .secondary-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.primary-btn {
    background: white;
    color: black;
}

.primary-btn:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.secondary-btn {
    background: rgba(255,255,255,0.05);
    color: white;
    margin-left: 1rem;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.image-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.card-preview {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-info .name {
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-status {
    font-size: 0.8rem;
    color: #4CAF50;
    display: none;
}

.card-status.visible {
    display: block;
}

.download-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.download-btn:not([disabled]):hover {
    opacity: 1;
}

.download-btn[disabled] {
    cursor: not-allowed;
}

/* Conversion states */
.converting .card-preview {
    position: relative;
}

.converting .card-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.converting .card-preview::before {
    content: 'Converting...';
    position: absolute;
    z-index: 2;
    font-size: 0.8rem;
    font-weight: 600;
}
