/* Custom EmailSender API Documentation Styles */

/* Gradient backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero pattern background */
.hero-pattern {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 30px 30px, 30px 30px;
    background-position: 0 0, 30px 30px, 15px 15px, 45px 45px;
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-10px) translateX(5px); }
    50% { transform: translateY(0px) translateX(10px); }
    75% { transform: translateY(5px) translateX(5px); }
}

/* Alternative simpler pattern if the above doesn't work */
.hero-pattern-simple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 60px 60px;
    background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
}

/* Alternative dotted pattern */
.hero-pattern-dots {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Animated background option */
.hero-pattern-animated {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Code blocks */
.code-block {
    background: #2d3748;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Navigation links */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
    padding-left: 1rem;
}

/* API Status animation */
.api-status {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Animation for elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Apply animations */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* Code block improvements */
.code-block {
    position: relative;
}

.code-block::before {
    content: "Click to copy";
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    color: #a0aec0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.code-block:hover::before {
    opacity: 1;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .nav-mobile {
        display: block;
    }

    .nav-desktop {
        display: none;
    }
}

/* Loading animation for API status */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Interactive elements */
.interactive-demo {
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.interactive-demo:hover {
    border-color: #667eea;
    background: #edf2f7;
}

/* Table improvements */
.api-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.api-table th {
    background: #667eea;
    color: white;
    font-weight: 600;
}

.api-table td, .api-table th {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
}

.api-table tr:last-child td {
    border-bottom: none;
}

/* Success/Error message styles */
.message-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.message-error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Feature card enhancements */
.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Navigation improvements */
.nav-item {
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

/* Syntax highlighting improvements */
.language-json .token.property {
    color: #c792ea;
}

.language-json .token.string {
    color: #c3e88d;
}

.language-json .token.number {
    color: #f78c6c;
}

.language-json .token.boolean {
    color: #ff5370;
}

/* Mobile responsive navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 100%;
    background: white;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    font-size: 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Print styles */
@media print {
    .nav, .footer, .hero-section {
        display: none;
    }

    .code-block {
        background: #f8f8f8 !important;
        color: #333 !important;
        border: 1px solid #ddd;
    }

    .gradient-bg {
        background: #f8f8f8 !important;
    }
}
