/* ===== MODERN FONT TESTER UI ===== */

/* CSS Reset and Variables */
:root {
    --primary: #4361ee;
    --primary-hover: #3046c7;
    --secondary: #3a0ca3;
    --accent: #7209b7;
    --success: #2ec4b6;
    --success-hover: #29b0a3;
    --danger: #e63946;
    --danger-hover: #d12836;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --border-radius: 8px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ===== LAYOUT SYSTEM ===== */

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--surface);
    border-bottom: 1px solid #e1e5e9;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

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

.app-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.app-main {
    flex: 1;
    padding: 2rem 0;
}

/* ===== CONTAINER SYSTEM ===== */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e1e5e9;
}

/* ===== THEME TOGGLE ===== */

.theme-toggle {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* ===== BUTTON SYSTEM ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

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

.btn-success:hover {
    background: var(--success-hover);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Legacy Button Support */
button,
.button,
#feedbackButton,
#viewFeedbackBtn,
#logoutButton,
#loadMoreBtn,
#backButton,
.back-btn,
.guide-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    background: var(--primary);
    color: white;
}

button:hover,
.button:hover,
#feedbackButton:hover,
#viewFeedbackBtn:hover,
#logoutButton:hover,
#loadMoreBtn:hover,
#backButton:hover,
.back-btn:hover,
.guide-promo-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Language Toggle */
.language-toggle,
#langToggle {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
}

.language-toggle:hover,
#langToggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* ===== FORM SYSTEM ===== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.form-input,
.form-textarea,
input[type="text"],
input[type="email"],
textarea,
select {
    padding: 0.8rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-textarea,
textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== NAVIGATION SYSTEM ===== */

.nav-section {
    margin-top: 3rem;
}

.nav-header {
    text-align: center;
    margin-bottom: 2rem;
}

.nav-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.nav-subtitle {
    color: var(--text-light);
    margin: 0;
}

.nav-grid,
.nav-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.nav-card {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
    text-decoration: none;
}

.nav-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.nav-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.nav-card-description {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0;
}

.nav-card button {
    background: transparent;
    border: none;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    cursor: pointer;
    width: 100%;
    padding: 0;
    text-align: inherit;
}

/* ===== EDITOR SYSTEM ===== */

.editor-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e1e5e9;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.editor-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.font-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.font-control-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}

.font-selector {
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.font-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.editor-container {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e1e5e9;
    transition: border-color 0.2s ease;
}

.editor-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* ===== IMPROVED CHARACTER GRID ===== */

.character-grid-container {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #e1e5e9;
}

.character-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e5e9;
}

.character-grid-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.character-search-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.character-search-input {
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.character-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.character-category-filter {
    min-width: 150px;
    padding: 0.6rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease;
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 4px;
    background: #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    margin: 2rem 0;
    padding: 4px;
    max-height: 600px;
    overflow-y: auto;
}

.character-cell {
    aspect-ratio: 1;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 4px;
    border: 1px solid transparent;
    font-weight: 400;
}

.character-cell:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
    border-color: var(--primary-hover);
}

.character-cell:active {
    transform: scale(0.95);
}

.character-cell.clicked {
    animation: characterClick 0.3s ease;
    background: var(--success);
    color: white;
}

@keyframes characterClick {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: var(--success); }
    100% { transform: scale(1); }
}

.character-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
}

.character-range-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.character-range-btn {
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s ease;
}

.character-range-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.character-range-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== FEEDBACK SYSTEM ===== */

.feedback-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border: 1px solid #e1e5e9;
}

.feedback-header {
    text-align: center;
    margin-bottom: 2rem;
}

.feedback-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.feedback-subtitle {
    color: var(--text-light);
    margin: 0;
}

.feedback-form {
    display: grid;
    gap: 1.5rem;
}

/* File Upload */
.file-upload-container {
    margin: 1rem 0;
}

.file-drop-zone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8fafc;
    cursor: pointer;
    margin-bottom: 1rem;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(67, 97, 238, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.file-drop-text {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.file-drop-subtext {
    font-size: 0.85rem;
    color: var(--text-light);
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.file-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: transform 0.2s ease;
}

.file-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.file-name {
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== FLOATING ACTION BUTTON ===== */

.fab-feedback {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-feedback:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 35px rgba(67, 97, 238, 0.4);
}

/* ===== MODAL SYSTEM ===== */

.modal {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    transform: translateY(-50px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

/* ===== STATUS MESSAGES ===== */

.status-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: none;
    font-weight: 500;
}

.status-message.success {
    background: rgba(46, 196, 182, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-message.error {
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.status-message.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid #ffc107;
    color: #856404;
}

.status-message.show {
    display: block;
    animation: slideIn 0.3s ease;
}

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

/* ===== LOADING STATES ===== */

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff40;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== GUIDE PROMO ===== */

.guide-promo {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    border: 1px solid rgba(67, 97, 238, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.guide-promo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.15);
}

.guide-promo-content h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    font-size: 1.2rem;
}

.guide-promo-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.4;
}

.guide-promo-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.guide-promo-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ===== DARK MODE ===== */

[data-theme="dark"] {
    --background: #0f1419;
    --surface: #1f2937;
    --text: #f9fafb;
    --text-light: #9ca3af;
}

[data-theme="dark"] body {
    background: var(--background);
    color: var(--text);
}

[data-theme="dark"] .page-container,
[data-theme="dark"] .editor-section,
[data-theme="dark"] .feedback-section,
[data-theme="dark"] .character-grid-container,
[data-theme="dark"] .nav-card {
    background: var(--surface);
    border-color: #374151;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .font-selector,
[data-theme="dark"] .character-search-input,
[data-theme="dark"] .character-category-filter,
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--surface);
    border-color: #374151;
    color: var(--text);
}

[data-theme="dark"] .file-drop-zone {
    background: #374151;
    border-color: #4b5563;
}

[data-theme="dark"] .theme-toggle {
    background: var(--surface);
    border-color: #374151;
}

[data-theme="dark"] .app-header {
    background: var(--surface);
    border-color: #374151;
}

[data-theme="dark"] .language-toggle,
[data-theme="dark"] #langToggle {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary);
}

[data-theme="dark"] .character-cell {
    background: var(--surface);
    border-color: #374151;
}

[data-theme="dark"] .character-info {
    background: #374151;
    border-color: var(--primary);
}

[data-theme="dark"] .character-range-btn {
    background: #374151;
    border-color: #4b5563;
    color: var(--text);
}

[data-theme="dark"] .file-item {
    background: var(--surface);
    border-color: #374151;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .app-header-content {
        padding: 0 1rem;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .app-title {
        font-size: 1.5rem;
        flex: 1;
        min-width: 200px;
    }

    .app-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .language-toggle,
    #langToggle {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .container {
        padding: 0 1rem;
    }

    .page-container,
    .editor-section,
    .feedback-section,
    .character-grid-container {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .character-grid-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .character-search-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .character-search-input,
    .character-category-filter {
        min-width: auto;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 3px;
        padding: 3px;
    }

    .character-cell {
        font-size: 1.4rem;
    }

    .font-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .font-selector {
        min-width: auto;
    }

    .nav-grid,
    .nav-buttons {
        grid-template-columns: 1fr;
    }

    .file-list {
        grid-template-columns: 1fr;
    }

    .guide-promo {
        flex-direction: column;
        text-align: center;
    }

    .fab-feedback {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* ===== EXTRA SMALL SCREENS ===== */
@media (max-width: 480px) {
    .app-header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .app-controls {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .app-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .language-toggle,
    #langToggle {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }

    .character-cell {
        font-size: 1.2rem;
    }
}

/* ===== LOGIN PAGE STYLES ===== */

.login-container {
    max-width: 400px;
    margin: 10vh auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
}

/* ===== FEEDBACK PAGE STYLES ===== */

/* Feedback Page Layout */
.feedback-workspace {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.feedback-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

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

.feedback-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.feedback-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.feedback-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Stats Section */
.feedback-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feedback-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feedback-stat-icon {
    font-size: 2rem;
}

.feedback-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.feedback-stat-label {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

/* Feedback Grid */
.feedback-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feedback-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

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

.feedback-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feedback-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.feedback-user-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.25rem 0;
}

.feedback-date {
    color: #718096;
    font-size: 0.9rem;
}

.feedback-card-indicators {
    display: flex;
    gap: 0.5rem;
}

.feedback-indicator {
    font-size: 1.2rem;
}

.feedback-card-content {
    padding: 1.5rem;
}

.feedback-text {
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.feedback-screenshot-preview {
    margin-top: 1rem;
}

.feedback-screenshot-preview img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.feedback-attachments-info {
    background: #f7fafc;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #718096;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Modal Styles */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
    backdrop-filter: blur(8px);
}

.feedback-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-modal-content {
    background: var(--surface);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-modal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feedback-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.feedback-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.feedback-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.feedback-modal-body {
    padding: 2rem;
}

.feedback-modal-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.feedback-modal-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.feedback-modal-user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.25rem 0;
}

.feedback-modal-date {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
}

.feedback-modal-feedback-text {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    line-height: 1.6;
    color: #4a5568;
    margin: 1.5rem 0;
}

.feedback-modal-screenshot {
    margin: 1.5rem 0;
    text-align: center;
}

.feedback-modal-screenshot img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-modal-attachments {
    margin: 1.5rem 0;
}

.feedback-modal-attachments h5 {
    margin: 0 0 1rem 0;
    color: #2d3748;
}

.feedback-attachment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.feedback-attachment-item {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.feedback-attachment-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feedback-attachment-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feedback-attachment-name {
    font-weight: 500;
    color: #2d3748;
    word-break: break-word;
}

/* Screenshot Container Styles */
.screenshot-container {
    position: relative;
    width: 100%;
    height: 500px;
    min-height: 400px;
    background: #f8f9fa;
    border: 2px dashed #e1e5e9;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.screenshot-container img {
    display: block;
    max-width: none;
    max-height: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.screenshot-container.dragging {
    cursor: grabbing !important;
}

.screenshot-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.screenshot-container:hover .screenshot-overlay {
    opacity: 1;
}

.screenshot-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.screenshot-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.screenshot-controls {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid #e1e5e9;
}

.zoom-controls button {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s ease;
}

.zoom-controls button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.zoom-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zoom-level {
    font-weight: 600;
    color: #2d3748;
    min-width: 50px;
    text-align: center;
    font-size: 14px;
}

.screenshot-info {
    color: #718096;
    font-size: 13px;
    text-align: center;
    max-width: 400px;
    line-height: 1.4;
}

/* Fullscreen Viewer Styles */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 15000;
    overflow: hidden;
}

.fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fullscreen-content img {
    display: block;
    max-width: none;
    max-height: none;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
}

.fullscreen-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.fullscreen-zoom-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.fullscreen-zoom-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.fullscreen-zoom-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.fullscreen-zoom-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fullscreen-zoom-level {
    color: white;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
    font-size: 16px;
}

.fullscreen-info {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    text-align: center;
    max-width: 500px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.fullscreen-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* ===== ENHANCED HEADER STYLES ===== */

.header-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
}

.theme-toggle,
.theme-toggle-header {
    width: 44px;
    height: 44px;
    background: var(--surface);
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.theme-toggle:hover,
.theme-toggle-header:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

/* ===== ENHANCED FEEDBACK STYLES ===== */

.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
    backdrop-filter: blur(8px);
}

.feedback-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-modal-content {
    background: var(--surface);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== IMPROVED RESPONSIVE BREAKPOINTS ===== */

@media (max-width: 768px) {
    .header-brand {
        align-items: center;
        text-align: center;
    }
    
    .page-subtitle {
        text-align: center;
    }
    
    .app-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .app-controls {
        justify-content: center;
        width: 100%;
    }
}