/* ============================================
   PDFWORK.APP - Main Stylesheet
   Modern Design with Animations & Graphics
   ============================================ */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #007aff;
    --primary-dark: #0051d5;
    --primary-light: #5ac8fa;
    --secondary-color: #00695c;
    --success-color: #34c759;
    --danger-color: #ff3b30;
    --warning-color: #ff9500;
    --info-color: #5ac8fa;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e5e5e7;
    --bg-gradient: linear-gradient(135deg, #004d40 0%, #00695c 100%);
    --bg-gradient-light: linear-gradient(135deg, #00695c 0%, #00897b 100%);
    --bg-gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #c7c7cc;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.24);
    
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== Animated Background Pattern ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 122, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(88, 86, 214, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(90, 200, 250, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== Container ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 22px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

p {
    margin-bottom: 1rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-danger {
    background: var(--danger-color);
    color: white;
}

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

.btn:active {
    transform: translateY(0);
}

/* ===== Cards ===== */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.app-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.app-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.app-card:hover::after {
    transform: scaleX(1);
}

.app-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.app-card--featured {
    background: var(--bg-gradient);
    color: white;
    border: none;
}

.app-card--featured::after {
    background: rgba(255, 255, 255, 0.3);
}

.app-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: inherit;
}

.app-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.app-card--featured p {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-gradient-blue);
    border-radius: var(--border-radius-xl);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    color: white;
    animation: heroFadeIn 1s ease-out;
}

.hero::before {
    content: '📄';
    position: absolute;
    font-size: 200px;
    opacity: 0.1;
    top: -50px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '💼';
    position: absolute;
    font-size: 150px;
    opacity: 0.1;
    bottom: -30px;
    left: -30px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: white;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
    animation: slideInDown 0.8s ease-out 0.2s both;
}

.hero .subtitle {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 30px 0;
    font-weight: 400;
    animation: slideInDown 0.8s ease-out 0.4s both;
}

.hero .description {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 40px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInDown 0.8s ease-out 0.6s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Grid Layouts ===== */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

@media (max-width: 1024px) {
    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Sections ===== */
.section {
    margin: 60px 0;
    padding: 50px 20px;
    position: relative;
}

.section:first-of-type {
    margin-top: 30px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

/* ===== Icons & Graphics ===== */
.icon {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.icon-large {
    font-size: 64px;
    margin-bottom: 20px;
}

/* ===== Status Badges ===== */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.active {
    background: var(--success-color);
    color: white;
}

.status.development {
    background: var(--warning-color);
    color: white;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bg-tertiary);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--bg-primary);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* ===== Loading States ===== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Notifications ===== */
.notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    opacity: 1;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }
    
    .hero .subtitle {
        font-size: 20px;
    }
    
    .hero .description {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .container {
        padding: 15px;
    }
}

/* ===== PDF/Document Theme Graphics ===== */
.pdf-icon {
    display: inline-block;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 8px;
    position: relative;
    margin: 0 auto;
}

.pdf-icon::before {
    content: '📄';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

/* ===== Interactive Elements ===== */
.interactive {
    cursor: pointer;
    transition: var(--transition);
}

.interactive:hover {
    transform: scale(1.05);
}

.interactive:active {
    transform: scale(0.95);
}

/* ===== Decorative Elements ===== */
.decorative-line {
    height: 2px;
    background: var(--bg-gradient);
    border-radius: 1px;
    margin: 20px 0;
    animation: expandWidth 1s ease-out;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ===== Interactive Elements ===== */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== Scroll Animations ===== */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* ===== PDF Theme Graphics ===== */
.pdf-icon-large {
    font-size: 80px;
    opacity: 0.1;
    position: absolute;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

/* ===== Gradient Text ===== */
.gradient-text {
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ===== Interactive Cards ===== */
.interactive-card {
    position: relative;
    overflow: hidden;
}

.interactive-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 122, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.interactive-card:hover::after {
    width: 300px;
    height: 300px;
}
