/* Premium B2B SaaS Aesthetics */
:root {
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    --hover-gradient: linear-gradient(135deg, #4338ca 0%, #2563eb 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;
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.8rem !important;
    }
    .tool-header p {
        font-size: 1rem !important;
    }
}

/* 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(59, 130, 246, 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: #eff6ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 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(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 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(59, 130, 246, 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(59, 130, 246, 0.4);
    color: white;
}

/* Grid & Cards */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

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

@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(200px, 1fr));
    }
}

.page-card {
    position: relative;
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

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

.page-card.selected {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.page-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    color: #10b981;
    font-size: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) {
    .page-card.selected::after {
        top: 12px;
        right: 12px;
        font-size: 28px;
    }
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.page-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: white;
    text-align: center;
    padding: 6px 0;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .page-number {
        padding: 8px 0;
        font-size: 0.9rem;
    }
}

.page-canvas {
    width: 100%;
    height: auto;
    display: block;
    background: white;
}

/* Floating Action Bar */
.action-bar {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.2);
    width: 90%;
    max-width: 400px;
}

@media (min-width: 768px) {
    .action-bar {
        bottom: 30px;
        padding: 16px 32px;
        border-radius: 100px;
        flex-direction: row;
        gap: 24px;
        width: auto;
        max-width: none;
    }
}

/* SEO Section Cards */
.feature-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    height: 100%;
    border-top: 4px solid #3b82f6;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .feature-card {
        padding: 32px;
    }
}

.feature-card:hover {
    transform: translateY(-5px);
}
