/* Main styles */
body {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-top: 2rem;
}

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

h2 {
    color: #2c3e50;
    font-weight: 700;
}

h6 {
    color: #7f8c8d;
    font-weight: 400;
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #4285f4, #34a853);
    margin: 2rem 0;
    border-radius: 2px;
}

.nav-link {
    text-transform: none !important;
}

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

.btn-primary {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
}

.btn-secondary {
    background-color: #e0e0e0;
    border-color: #d6d6d6;
    color: #000000;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d0d0d0;
    transform: translateY(-1px);
}

.CodeMirror {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    font-size: 12px;
    height: auto;
    min-height: 350px;
    transition: border-color 0.3s ease;
}

.CodeMirror-focused {
    border-color: #4285f4;
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25);
}

#loading-spinner {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
}

#loading-spinner p {
    font-size: 1.2rem;
    color: #007bff;
    font-weight: 500;
}

.badge {
    display: inline;
    text-transform: none;
    font-size: 80%;
    font-weight: 700;
    line-height: 1;
    padding: .35rem .5rem;
    transition: all 0.3s ease;
    text-align: center;
    vertical-align: baseline;
    white-space: nowrap;
    border-radius: .375rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge-success { color: #fff; background-color: #5cc9a7; }
.badge-danger { color: #fff; background-color: #f25767; }
.bg-brand-pinterest { background-color: #bd081c !important; }
.bg-translucent-dark { background-color: rgba(14, 11, 43, .6) !important; }
.bg-dark-dark { background-color: #0a081f !important; }
.hand-cursor { cursor: pointer; }

.modal-content {
    border-radius: 20px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-btn {
    border: 2px solid #007bff;
    border-radius: 10px;
    background: transparent;
    color: #007bff;
    padding: 20px;
    text-align: center;
    transition: background 0.3s ease, color 0.3s ease;
}

.modal-btn:hover {
    background: #007bff;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.modal-btn i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.row.p-1 {
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px !important;
    transition: all 0.3s ease;
}

.row.p-1:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

#rp-number {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
}

footer {
    margin-top: 4rem;
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e0e0e0;
}

.mt-2[style="font-size: 12px;"] {
    color: #666;
    line-height: 1.6;
}

.form-label {
    font-weight: 500;
    color: #333;
}

.summary-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    border: 2px solid #dee2e6;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.summary-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #4285f4;
    padding-bottom: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.summary-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.summary-item .status-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.summary-item .status-name {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.summary-item .status-count {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-item .status-percentage {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.summary-item.live {
    border-left: 4px solid #5cc9a7;
}
.summary-item.live .status-count {
    color: #5cc9a7;
}
.summary-item.live .status-icon {
    color: #5cc9a7;
}

.summary-item.verify {
    border-left: 4px solid #f25767;
}
.summary-item.verify .status-count {
    color: #f25767;
}
.summary-item.verify .status-icon {
    color: #f25767;
}

.summary-item.disabled {
    border-left: 4px solid #bd081c;
}
.summary-item.disabled .status-count {
    color: #bd081c;
}
.summary-item.disabled .status-icon {
    color: #bd081c;
}

.summary-item.notexist {
    border-left: 4px solid rgba(14, 11, 43, .6);
}
.summary-item.notexist .status-count {
    color: rgba(14, 11, 43, .6);
}
.summary-item.notexist .status-icon {
    color: rgba(14, 11, 43, .6);
}

.summary-item.unknown {
    border-left: 4px solid #0a081f;
}
.summary-item.unknown .status-count {
    color: #0a081f;
}
.summary-item.unknown .status-icon {
    color: #0a081f;
}

.total-summary {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
}

.total-summary .total-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.total-summary .total-count {
    font-size: 2.2rem;
    font-weight: 700;
}

@media (max-width: 768px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .summary-item {
        padding: 12px;
    }
    
    .summary-item .status-count {
        font-size: 1.5rem;
    }
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.custom-toast {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    min-width: 350px;
    animation: slideInRight 0.3s ease-out;
}

.custom-toast .toast-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.custom-toast .toast-body {
    font-weight: 500;
    font-size: 1rem;
}

.custom-toast .btn-close {
    filter: brightness(0) invert(1);
}

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

.duplicate-summary {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.duplicate-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.4);
}

.duplicate-summary .duplicate-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.duplicate-summary .duplicate-count {
    font-size: 1.8rem;
    font-weight: 700;
}

.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    border-radius: 50px;
    padding: 10px 15px;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e0e0e0;
}

body.dark-mode .card {
    background: #2d2d2d;
    color: #e0e0e0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode h2, body.dark-mode h6 {
    color: #e0e0e0;
}

body.dark-mode .form-label {
    color: #b0b0b0;
}

body.dark-mode .CodeMirror {
    background: #1e1e1e;
    color: #e0e0e0;
    border-color: #444;
}

body.dark-mode .CodeMirror-focused {
    border-color: #4285f4;
}

body.dark-mode .summary-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-color: #444;
}

body.dark-mode .summary-item {
    background: #1e1e1e;
    border-color: #444;
}

body.dark-mode .summary-title {
    color: #e0e0e0;
}

body.dark-mode .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .modal-body {
    background: #2d2d2d;
}

body.dark-mode #duplicate-list {
    background: #1e1e1e !important;
}

body.dark-mode #duplicate-list > div {
    background: #2d2d2d !important;
    border-color: #444 !important;
    color: #e0e0e0;
}

body.dark-mode .row.p-1 {
    background: #1e1e1e;
}

body.dark-mode .row.p-1:hover {
    background: #333;
}

body.dark-mode footer {
    background: rgba(45, 45, 45, 0.9);
    border-top-color: #444;
    color: #e0e0e0;
}

body.dark-mode #loading-spinner {
    background: rgba(45, 45, 45, 0.9);
}

body.dark-mode .mt-2[style="font-size: 12px;"] {
    color: #b0b0b0;
}

body.dark-mode .navbar {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%) !important;
}

body.dark-mode .navbar-brand {
    color: #4a90e2 !important;
}

body.dark-mode .navbar-nav .nav-link {
    color: #e0e0e0 !important;
}

body.dark-mode .navbar-nav .nav-link:hover {
    background-color: rgba(74, 144, 226, 0.2);
    color: #4a90e2 !important;
}

body.dark-mode .navbar-nav .nav-link.active {
    background-color: #4a90e2;
    color: white !important;
}

/* Share button and modal styles */
.share-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.share-modal-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    border: none;
}

.share-option {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: transparent;
    color: #333;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    margin-bottom: 15px;
}

.share-option:hover {
    background: #f8f9fa;
    border-color: #28a745;
    color: #28a745;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
    text-decoration: none;
}

.share-option i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.share-option .share-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.share-option .share-desc {
    font-size: 0.9rem;
    color: #666;
}

body.dark-mode .share-option {
    background: #2d2d2d;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .share-option:hover {
    background: #3d3d3d;
    border-color: #28a745;
    color: #28a745;
}

body.dark-mode .share-option .share-desc {
    color: #b0b0b0;
}

/* Full screen modal styles for mobile-like experience */
@media (max-width: 768px) {
    #shareModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100vh;
    }
    
    #shareModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }
    
    #shareModal .modal-header {
        border-radius: 0;
    }
    
    #shareModal .modal-body {
        height: calc(100vh - 56px);
        overflow-y: auto;
        padding: 15px;
    }
    
    #shareModal #image-preview {
        min-height: 300px;
        max-height: 70vh;
    }
}

/* Fullscreen modal on larger screens */
#shareModal .modal-fullscreen-custom {
    width: 100vw;
    max-width: 100%;
    height: 100vh;
    margin: 0;
}

#shareModal .modal-fullscreen-custom .modal-content {
    height: 100vh;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

#shareModal .modal-fullscreen-custom .modal-header {
    border-radius: 0;
    flex-shrink: 0;
}

#shareModal .modal-fullscreen-custom .modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
}

#shareModal .modal-fullscreen-custom .modal-body .row {
    height: 100%;
    margin: 0;
}

#shareModal .modal-fullscreen-custom .modal-body .col-md-6 {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

#shareModal .modal-fullscreen-custom #image-preview {
    height: calc(100% - 40px);
    min-height: unset;
    max-height: unset;
    overflow: auto;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    #shareModal .modal-fullscreen-custom .modal-body .col-md-6 {
        height: auto;
    }
    
    #shareModal .modal-fullscreen-custom .modal-body .col-md-6:first-child {
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 30px;
        margin-bottom: 20px;
    }
    
    #shareModal .modal-fullscreen-custom #image-preview {
        height: 500px;
        margin-bottom: 20px;
    }
}

/* Controls section styling */
#shareModal .controls-section {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
}

body.dark-mode #shareModal .controls-section {
    background: #1e1e1e;
    border-right-color: #444;
}

/* Preview section styling */
#shareModal .preview-section {
    background: #ffffff;
}

body.dark-mode #shareModal .preview-section {
    background: #2d2d2d;
}

/* Compact form controls */
#shareModal .form-control,
#shareModal .btn {
    height: 38px;
    font-size: 0.9rem;
}

#shareModal .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

#shareModal .mb-3 {
    margin-bottom: 0.8rem !important;
}

/* Better preview area */
#shareModal #image-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

body.dark-mode #shareModal #image-preview {
    background: #1e1e1e;
    border-color: #444;
}

/* Background color selector styles */
.bg-color-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.bg-color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.bg-color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.bg-color-option.selected {
    border-color: #28a745;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.bg-color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

body.dark-mode .bg-color-option {
    border-color: #444;
}

body.dark-mode .bg-color-option.selected {
    border-color: #28a745;
}

/* Contact info textarea style update */
#modal-contact-info {
    min-height: 60px !important;
    height: 60px !important;
    line-height: 1.5 !important;
    resize: none;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}