/* Core Nexis CDN - Main Stylesheet */
/* Location: /assets/css/style.css */

:root {
    --primary-color: #fe5940;
    --secondary-color: #000b36;
    --bg-primary: linear-gradient(135deg, var(--secondary-color) 0%, #1a237e 100%);
    --bg-secondary: rgba(255, 255, 255, 0.1);
    --text-primary: white;
    --text-secondary: rgba(255, 255, 255, 0.9);
    --border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    --bg-secondary: rgba(0, 0, 0, 0.05);
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(254, 89, 64, 0.3);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--primary-color);
}

.nav a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.theme-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Header Ad */
.header-ad {
    max-width: 1400px;
    margin: 1rem auto 0;
    padding: 0 2rem;
    text-align: center;
}

.header-ad .adsbygoogle {
    display: block;
    margin: 0 auto;
    max-width: 728px;
    min-height: 90px;
}

/* Main Container */
.container {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

/* Image Section */
.image-section {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

[data-theme="light"] .image-section {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.image-container {
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
    overflow: hidden;
    cursor: zoom-in;
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 650px;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.main-image:hover {
    opacity: 0.95;
}

.image-error {
    color: #6c757d;
    text-align: center;
    padding: 3rem 2rem;
    font-size: 1.1rem;
}

.zoomed {
    cursor: zoom-out;
    overflow: auto;
}

.zoomed .main-image {
    transform: scale(2);
    cursor: grab;
}

.zoomed .main-image:active {
    cursor: grabbing;
}

/* Info Panel */
.info-panel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    height: fit-content;
}

[data-theme="light"] .info-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-secondary);
    word-break: break-all;
    font-size: 0.9rem;
}

/* Actions */
.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

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

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

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

.btn-primary:hover {
    background: #e54830;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 89, 64, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.share-btn {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Sidebar Ad */
.sidebar-ad {
    margin-top: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .sidebar-ad {
    background: rgba(0, 0, 0, 0.03);
}

.sidebar-ad .adsbygoogle {
    display: block;
    margin: 0 auto;
    width: 300px;
    height: 250px;
    max-width: 100%;
}

@media (max-width: 768px) {
    .sidebar-ad .adsbygoogle {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .sidebar-ad .adsbygoogle {
        width: 100%;
        height: 150px;
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-links a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Error Styles */
.error-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    max-width: 500px;
}

.error-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    line-height: 1.5;
}

.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e54830;
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Animations */
@keyframes slideIn {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOut {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .info-panel {
        order: -1;
    }
    
    .image-container {
        max-height: 60vh;
        overflow: hidden;
    }
    
    .main-image {
        max-height: 60vh;
        object-fit: contain;
    }
    
    .header-ad {
        padding: 0 1rem;
    }
    
    .header-ad .adsbygoogle {
        max-width: 100%;
        min-height: 50px;
    }
    
    .footer-links {
        gap: 1rem;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 0.5rem;
    }
    
    .container {
        padding: 0.5rem;
    }
    
    .image-section,
    .info-panel {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav {
        gap: 0.5rem;
    }
    
    .nav a {
        font-size: 0.9rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        padding: 0.75rem;
    }
    
    .header-ad {
        padding: 0 0.5rem;
    }
    
    .sidebar-ad {
        margin-top: 1rem;
        padding: 0.5rem;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(255, 255, 255, 0.5);
    }
    
    [data-theme="light"] {
        --border-color: rgba(0, 0, 0, 0.3);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .info-panel,
    .header-ad,
    .sidebar-ad {
        display: none;
    }
    
    .container {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0;
    }
    
    .image-section {
        background: none;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    
    .main-image {
        max-width: 100%;
        height: auto;
    }
}