/**
 * PasteLink Standalone Template Styles
 * Independent design from WordPress theme
 */

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

body.pastelink-standalone {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #e8e8e8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

.pastelink-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
.pastelink-header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #ddd;
}

/* Adjust header position when WordPress admin bar is present */
.admin-bar .pastelink-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .pastelink-header {
        top: 46px;
    }
}

.pastelink-header .pastelink-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.pastelink-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #667eea;
    font-size: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.pastelink-logo a:hover {
    color: #764ba2;
    transform: translateY(-2px);
}

.pastelink-logo svg {
    width: 28px;
    height: 28px;
}

.pastelink-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.pastelink-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pastelink-nav a:hover {
    background: #f5f5f5;
    color: #667eea;
}

.pastelink-btn-primary {
    background: #667eea;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 3px;
    font-weight: 500;
    box-shadow: none;
    border: 1px solid #5568d3;
}

.pastelink-btn-primary:hover {
    background: #5568d3 !important;
    box-shadow: none;
}

/* Mobile Menu Toggle */
.pastelink-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.pastelink-mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.pastelink-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.pastelink-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.pastelink-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .pastelink-header {
        position: relative;
    }
    
    .pastelink-header .pastelink-container {
        padding: 0;
        flex-direction: column;
        align-items: stretch;
    }
    
    .pastelink-header .pastelink-container > div:first-child {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        width: 100%;
    }
    
    .pastelink-logo {
        flex: 0 0 auto;
    }
    
    .pastelink-logo a {
        font-size: 18px;
    }
    
    .pastelink-mobile-toggle {
        display: flex;
        flex: 0 0 auto;
    }
    
    .pastelink-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        flex-direction: column;
        gap: 0;
        background: #fff;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
        border-top: 0;
    }
    
    .pastelink-nav.active {
        max-height: 500px;
        padding: 10px 0;
        border-top: 1px solid #e0e0e0;
    }
    
    .pastelink-nav a {
        padding: 12px 15px;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        text-align: left;
        display: block;
    }
    
    .pastelink-nav a:last-child {
        border-bottom: none;
    }
    
    .pastelink-nav a:hover {
        background: #f8f9fa;
    }
    
    .pastelink-btn-primary {
        margin: 5px 15px !important;
        width: calc(100% - 30px) !important;
        text-align: center !important;
        border-radius: 6px !important;
    }
    
    /* Hide Mobile Overlay on vertical menu */
    .pastelink-mobile-overlay {
        display: none !important;
    }
}

/* Main Content */
.pastelink-main {
    flex: 1;
    padding: 40px 0;
    overflow-x: hidden;
}

.pastelink-content-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow-x: hidden;
    margin: 20px 0;
}

/* Paste Header */
.pastelink-paste-header {
    padding: 40px 30px 30px;
    background: transparent;
    border-bottom: none;
    text-align: center;
}

.pastelink-paste-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 40px;
    display: block;
    text-align: center;
}

.pastelink-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pastelink-badge-vip {
    background: #f5576c;
    color: #fff;
    box-shadow: none;
}

.pastelink-paste-meta {
    display: none;
}

.pastelink-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pastelink-meta-item svg {
    opacity: 0.7;
}

.pastelink-edit-link {
    color: #667eea !important;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pastelink-edit-link:hover {
    color: #764ba2 !important;
}

/* Tabs */
.pastelink-tabs {
    list-style: none !important;
    display: flex !important;
    gap: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-bottom: 1px solid #999 !important;
    flex-wrap: nowrap !important;
    margin: 0 0 -1px 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.pastelink-tabs::-webkit-scrollbar {
    height: 0;
    display: none;
}

.pastelink-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.pastelink-tab-item {
    padding: 10px 18px !important;
    background: #e8e8e8 !important;
    border: 1px solid #999 !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    color: #555 !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    margin-right: 5px !important;
    margin-bottom: 0 !important;
}

.pastelink-tab-item:hover {
    background: #d8d8d8 !important;
}

.pastelink-tab-item.active {
    background: #ffffff !important;
    color: #333 !important;
    border: 1px solid #999 !important;
    border-bottom: none !important;
    z-index: 10 !important;
    margin-bottom: -1px !important;
    padding-bottom: 11px !important;
}

/* Tab Content */
.pastelink-tab-container {
    padding: 30px !important;
    min-height: 300px !important;
    border: 1px solid #999 !important;
    border-top: none !important;
    background: #fff !important;
    overflow-x: hidden;
    word-wrap: break-word;
}

.pastelink-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.pastelink-tab-content.active {
    display: block;
}

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

/* Content Styling */
.pastelink-tab-content {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.pastelink-tab-content a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

.pastelink-tab-content a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.pastelink-tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pastelink-tab-content blockquote {
    border-left: 4px solid #667eea;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.pastelink-tab-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.pastelink-tab-content strong {
    color: #2c3e50;
    font-weight: 700;
}

.pastelink-tab-content em {
    color: #555;
}

.pastelink-center {
    text-align: center;
}

/* Password Box */
.pastelink-password-box {
    padding: 60px 30px;
    text-align: center;
}

.pastelink-lock-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.pastelink-password-box h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.pastelink-error-message {
    background: #fee;
    color: #c33;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fcc;
}

.pastelink-password-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.pastelink-password-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.pastelink-password-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pastelink-password-form button {
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pastelink-password-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* VIP Box */
.pastelink-vip-box {
    padding: 60px 30px;
    text-align: center;
}

.pastelink-vip-icon {
    color: #f5576c;
    margin-bottom: 20px;
}

.pastelink-vip-box h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.pastelink-vip-box p {
    color: #666;
    margin-bottom: 25px;
    font-size: 16px;
}

/* Ad Zone */
.pastelink-ad-zone {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Empty State */
.pastelink-empty-state {
    padding: 60px 30px;
    text-align: center;
    color: #999;
    font-size: 16px;
}

/* Footer */
.pastelink-footer {
    background: #fff;
    padding: 25px 0;
    margin-top: 40px;
    border-top: 1px solid #ddd;
}

.pastelink-footer p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.pastelink-footer strong {
    color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .pastelink-header .pastelink-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .pastelink-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .pastelink-nav a {
        width: 100%;
        text-align: center;
    }
    
    .pastelink-paste-title {
        font-size: 22px;
    }
    
    .pastelink-tabs {
        flex-direction: column;
        padding: 15px;
    }
    
    .pastelink-tab-item {
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        top: 0;
    }
    
    .pastelink-tab-item.active {
        border: 2px solid #667eea;
    }
    
    .pastelink-tab-container {
        padding: 20px;
    }
    
    .pastelink-password-form {
        flex-direction: column;
    }
}

/* JDownloader Button */
.pastelink-jd {
    margin: 15px 0;
}

.pastelink-jdbtn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pastelink-jdbtn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

/* VIP Lock in Content */
.pastelink-vip-lock {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe5a0 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.pastelink-vip-lock .dashicons {
    font-size: 48px;
    color: #ffc107;
}

/* YouTube Embeds */
.pastelink-tab-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: #667eea;
    color: #fff;
}

::-moz-selection {
    background: #667eea;
    color: #fff;
}

/* Paste Action Buttons */
.pastelink-paste-actions {
    margin-top: 30px;
    padding: 20px;
    text-align: center;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.pastelink-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.pastelink-tabs::-webkit-scrollbar {
    height: 6px;
}

.pastelink-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.pastelink-tabs::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.pastelink-tabs::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.pastelink-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.pastelink-tab:hover {
    color: #667eea;
    background: #f8f9fa;
}

.pastelink-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: transparent;
}

/* Mobile Tab Styles */
@media screen and (max-width: 768px) {
    .pastelink-paste-header {
        padding: 20px 15px 15px;
    }
    
    .pastelink-paste-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .pastelink-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .pastelink-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .pastelink-tabs::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .pastelink-tabs::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .pastelink-tab-item {
        padding: 10px 16px !important;
        font-size: 13px !important;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .pastelink-tab-container {
        padding: 20px 15px !important;
        min-height: 200px !important;
    }
    
    .pastelink-tab-content {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .pastelink-tab-content a {
        display: inline-block;
        max-width: 100%;
    }
    
    .pastelink-main {
        padding: 20px 0;
    }
}

.pastelink-action-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    color: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.pastelink-action-btn:hover {
    background: #6366f1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pastelink-visits-counter {
    display: inline-block;
    padding: 10px 20px;
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .pastelink-paste-actions {
        flex-direction: row;
        gap: 8px;
    }
    
    .pastelink-action-btn,
    .pastelink-visits-counter {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Dark Mode */
body.pastelink-theme-dark {
    background: #0d0d0d;
    color: #e0e0e0;
}

body.pastelink-theme-dark .pastelink-header {
    background: #1a1a1a;
    border-bottom: 1px solid #2d2d2d;
}

body.pastelink-theme-dark .pastelink-logo a {
    color: #fff;
}

body.pastelink-theme-dark .pastelink-nav a {
    color: #a0a0a0;
}

body.pastelink-theme-dark .pastelink-nav a:hover {
    background: #2d2d2d;
    color: #fff;
}

body.pastelink-theme-dark .pastelink-btn-primary {
    background: #4f46e5;
    border-color: #4f46e5;
}

body.pastelink-theme-dark .pastelink-btn-primary:hover {
    background: #4338ca;
    border-color: #4338ca;
}

body.pastelink-theme-dark .pastelink-content-card {
    background: transparent;
    border: none;
    box-shadow: none;
}

body.pastelink-theme-dark .pastelink-paste-header {
    background: transparent;
    border-bottom: none;
}

body.pastelink-theme-dark .pastelink-paste-title {
    color: #fff;
}

body.pastelink-theme-dark .pastelink-tabs {
    background: transparent;
    border: none;
}

body.pastelink-theme-dark .pastelink-tab-item {
    color: #888 !important;
    background: #0d0d0d !important;
    border: 1px solid #333 !important;
    border-bottom: 1px solid #333 !important;
}

body.pastelink-theme-dark .pastelink-tab-item:hover {
    background: #1a1a1a !important;
    color: #bbb !important;
}

body.pastelink-theme-dark .pastelink-tab-item.active {
    background: #1e1e1e !important;
    color: #fff !important;
    border: 1px solid #333 !important;
    border-bottom: none !important;
    z-index: 10 !important;
    margin-bottom: -1px !important;
    padding-bottom: 11px !important;
}

body.pastelink-theme-dark .pastelink-tab-container {
    background: #1e1e1e !important;
    border: 1px solid #333 !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

body.pastelink-theme-dark .pastelink-tab-content {
    background: transparent;
    color: #d0d0d0;
    border: none;
}

body.pastelink-theme-dark .pastelink-tab-content a {
    color: #6366f1;
}

body.pastelink-theme-dark .pastelink-tab-content a:hover {
    color: #818cf8;
    text-decoration: underline;
}

body.pastelink-theme-dark .pastelink-tab-content code {
    background: #0d0d0d;
    border: 1px solid #2d2d2d;
    color: #a0a0a0;
}

body.pastelink-theme-dark .pastelink-tab-content pre {
    background: #0d0d0d;
    border: 1px solid #2d2d2d;
}

body.pastelink-theme-dark .pastelink-password-box,
body.pastelink-theme-dark .pastelink-vip-box {
    background: #1a1a1a;
    border: 1px solid #2d2d2d;
}

body.pastelink-theme-dark .pastelink-password-box h3,
body.pastelink-theme-dark .pastelink-vip-box h3 {
    color: #fff;
}

body.pastelink-theme-dark .pastelink-password-form input {
    background: #0d0d0d;
    border: 1px solid #2d2d2d;
    color: #e0e0e0;
}

body.pastelink-theme-dark .pastelink-password-form input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

body.pastelink-theme-dark .pastelink-error-message {
    background: #2d1a1a;
    color: #ff6b6b;
    border: 1px solid #4d2020;
}

body.pastelink-theme-dark .pastelink-paste-actions {
    background: transparent;
    border-top: none;
    margin-top: 30px;
}

body.pastelink-theme-dark .pastelink-action-btn {
    background: #1e1e1e;
    color: #6366f1;
    border: 1px solid #4f46e5;
}

body.pastelink-theme-dark .pastelink-action-btn:hover {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

body.pastelink-theme-dark .pastelink-visits-counter {
    background: #1e1e1e;
    color: #a0a0a0;
    border: 1px solid #333;
}

body.pastelink-theme-dark .pastelink-footer {
    background: #1a1a1a;
    border-top: 1px solid #2d2d2d;
    color: #666;
}

body.pastelink-theme-dark .pastelink-ad-zone {
    background: #1a1a1a;
    border: 1px solid #2d2d2d;
}

body.pastelink-theme-dark .pastelink-empty-state {
    color: #666;
}

body.pastelink-theme-dark .pastelink-lock-icon,
body.pastelink-theme-dark .pastelink-vip-icon {
    color: #4f46e5;
}

/* Report Page Dark Mode */
body.pastelink-theme-dark .report-container {
    background: #1e1e1e;
    border: 1px solid #333;
}

body.pastelink-theme-dark .report-header {
    border-bottom: 2px solid #333;
}

body.pastelink-theme-dark .report-header h1 {
    color: #fff;
}

body.pastelink-theme-dark .report-paste-info {
    background: #0d0d0d;
    border: 1px solid #333;
}

body.pastelink-theme-dark .report-paste-info h3 {
    color: #a0a0a0;
}

body.pastelink-theme-dark .report-paste-info p {
    color: #d0d0d0;
}

body.pastelink-theme-dark .report-form-group label {
    color: #e0e0e0;
}

body.pastelink-theme-dark .report-form-group textarea {
    background: #0d0d0d;
    border: 1px solid #333;
    color: #e0e0e0;
}

body.pastelink-theme-dark .report-form-group textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

body.pastelink-theme-dark .report-submit-btn {
    background: #4f46e5;
    color: #fff;
}

body.pastelink-theme-dark .report-submit-btn:hover {
    background: #4338ca;
}

body.pastelink-theme-dark .report-success {
    background: #1a3d2d;
    border: 1px solid #2d5f4d;
    color: #6ee7b7;
}

body.pastelink-theme-dark .report-error {
    background: #2d1a1a;
    border: 1px solid #4d2020;
    color: #ff6b6b;
}

body.pastelink-theme-dark .back-link {
    color: #6366f1;
}

body.pastelink-theme-dark .back-link:hover {
    color: #818cf8;
}
