/* Tool-specific overrides */
.app-shell {
    max-width: 1600px !important;
    width: 100%;
}



.image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.image-name {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

/* Platforms Grid */
.platforms-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.platforms-grid.active {
    display: grid;
}

.platform-card {
    background: var(--card-bg);
    border-radius: var(--radius-small);
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
}

.platform-card:hover {
    border-color: rgba(94, 92, 230, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.platform-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.platform-ratio {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--icon-box-bg);
    padding: 4px 10px;
    border-radius: 99px;
}

.canvas-container {
    position: relative;
    width: 100%;
    background: var(--bg-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.platform-canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
    transition: box-shadow 0.2s;
}

.platform-canvas:active {
    cursor: grabbing;
}

.platform-canvas:hover {
    box-shadow: inset 0 0 0 1px var(--accent-color);
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.fit-toggle {
    display: flex;
    background: var(--icon-box-bg);
    border-radius: 8px;
    padding: 3px;
}

.fit-toggle button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.fit-toggle button.active {
    background: var(--card-bg);
    color: var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--input-border);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.zoom-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-color);
    min-width: 45px;
    text-align: right;
}

.download-pill-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.download-pill-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.25);
}

/* Global Actions Header */
.global-actions {
    display: none;
    background: var(--dropzone-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.global-actions.active {
    display: block;
}

.actions-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.bulk-control-group {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 99px;
    border: 1px solid var(--border-light);
}

.bulk-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.format-select {
    width: auto;
    min-width: 140px;
    padding: 8px 36px 8px 12px;
    border-radius: 99px;
    border: 1px solid var(--input-border);
    background: var(--card-bg);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.image-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.action-btn {
    padding: 10px 20px;
    background: var(--icon-box-bg);
    color: var(--accent-color);
    border: 1px solid transparent;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--icon-box-bg-hover);
    transform: translateY(-1px);
}

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

.action-btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px rgba(94, 92, 230, 0.25);
}

/* Mobile Layout Optimizations */
@media (max-width: 640px) {
    .app-shell {
        padding-left: 0;
        padding-right: 0;
        padding-top: 20px;
    }

    .tool-container {
        padding: 0;
        max-width: 100% !important;
    }

    .card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 20px !important;
    }

    .gallery-grid,
    .platforms-grid {
        padding-left: 0;
        padding-right: 0;
        grid-template-columns: 1fr;
    }

    .guide-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 24px;
    }

    .hero-compact {
        margin-bottom: 4px !important;
        padding: 0;
    }

    .hero-compact h1 {
        font-size: 1.75rem;
        margin-bottom: 6px;
        padding: 0 16px;
    }

    .hero-compact p {
        font-size: 0.9rem;
        line-height: 1.4;
        padding: 0 16px;
    }

    /* Fix bulk controls overflow */
    .bulk-control-group {
        flex-direction: column;
        align-items: stretch;
        border-radius: 12px;
        padding: 16px;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .actions-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .format-select {
        width: 100%;
    }
}