/* Premium B2B SaaS Aesthetics - Rotate Theme */
:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --hover-gradient: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    --surface-color: #ffffff;
    --background-color: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    background-color: var(--background-color);
}

.tool-header {
    background: white;
    padding: 40px 15px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

/* Premium Upload Area */
.upload-area {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px dashed #cbd5e1;
    border-radius: 24px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .upload-area {
        padding: 80px 40px;
    }
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.upload-area:hover, .upload-area.dragover {
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -5px rgba(99, 102, 241, 0.2);
}

.upload-area:hover::before, .upload-area.dragover::before {
    opacity: 0.03;
}

.upload-content {
    position: relative;
    z-index: 1;
}

.upload-icon-wrapper {
    width: 80px;
    height: 80px;
    background: #e0e7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5);
    animation: pulse 2s infinite;
}

@media (min-width: 768px) {
    .upload-icon-wrapper {
        width: 100px;
        height: 100px;
        margin: 0 auto 24px;
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.btn-premium {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .btn-premium {
        padding: 12px 32px;
    }
}

.btn-premium:hover {
    background: var(--hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    color: white;
}

/* Pages Grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 576px) {
    .pages-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (min-width: 992px) {
    .pages-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

@media (min-width: 1200px) {
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

.page-card {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    overflow: hidden;
}

.page-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.page-preview-wrapper {
    position: relative;
    width: 100%;
    padding-top: 141.4%; /* A4 ratio */
    background-color: #f1f5f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-preview-wrapper canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-number {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
}

.page-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.rotate-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: white;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.rotate-btn:hover {
    background: #e0e7ff;
    color: #4f46e5;
    border-color: #c7d2fe;
    transform: translateY(-2px);
}
