/* Custom SharedPaste Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --dark-bg: #1a1a1a;
    --light-bg: #ecf0f1;
}

/* Modern gradient background */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Enhanced container styling */
.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-top: 30px;
    margin-bottom: 30px;
    overflow: visible !important; /* Prevent dropdown clipping */
}

/* Fix Bootstrap dropdown z-index issues */
.dropdown-menu {
    z-index: 1050;
}

/* Ensure select elements are visible */
select.form-control, select.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M6 9L1 4h10z' fill='%23333'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Beautiful header */
.navbar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Enhanced buttons */
.btn {
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border: none;
}

/* Textarea styling */
#message, #pasteurl {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: #f8f9fa;
}

#message:focus, #pasteurl:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background: white;
}

/* Feature cards */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #2c3e50 !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
}

.alert-info svg {
    color: #667eea !important;
}

/* File upload area */
#filewrap {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#filewrap:hover {
    background: #667eea10;
    border-color: #764ba2;
}

/* Footer styling */
footer {
    margin-top: 50px;
    padding: 20px 0;
    text-align: center;
    color: #666;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    /* Fix dropdown visibility on mobile */
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        background: white;
        border: 1px solid rgba(0,0,0,.15);
        box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
    }
    
    .dropdown-menu.show {
        display: block;
        transform: none !important;
    }
    
    /* Ensure dropdowns are visible in navbar */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
    }
    
    /* Fix select dropdowns */
    select.form-control, select.form-select {
        background-color: white !important;
        color: #333 !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e, #16213e);
    }
    
    .container {
        background: rgba(30, 30, 30, 0.95);
        color: #ecf0f1;
    }
    
    #message, #pasteurl {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #34495e;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* SEO-friendly heading styles */
h1, h2, h3 {
    color: #2c3e50;
    font-weight: 700;
}

/* Accessibility improvements */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Mobile-specific fixes for dropdowns */
@media (max-width: 576px) {
    /* Ensure dropdowns don't go off-screen */
    .dropdown-menu {
        max-height: 300px;
        overflow-y: auto;
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 15px;
        width: auto !important;
    }
    
    /* Fix for form selects on iOS */
    select.form-control, select.form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Apple's recommended touch target size */
    }
    
    /* Ensure navbar dropdowns are accessible */
    .navbar .dropdown-menu {
        position: relative !important;
        margin: 0;
        width: 100% !important;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}