/* Gibson Font */
@import url('https://use.typekit.net/dau8cyy.css'); /* Replace with actual Adobe Fonts kit for Gibson */

/* Fallback to similar fonts if Gibson is unavailable */
:root {
    --sand-dark: #C8A44C;
    --sand-medium: #EAD27B;
    --sand-light: #F0E7AD;
    --water-light: #ABC8C6;
    --water-deep: #69ADBA;

    --font-primary: 'gibson', 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

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

body {
    font-family: var(--font-primary);
    background: linear-gradient(180deg, var(--water-light) 0%, var(--water-deep) 100%);
    color: #333;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
}

/* Auth Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(171, 200, 198, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-content {
    text-align: center;
    background: white;
    padding: 60px 80px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.auth-content h1 {
    font-size: 48px;
    color: var(--sand-dark);
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.tagline {
    font-size: 20px;
    color: var(--water-deep);
    margin-bottom: 40px;
    font-style: italic;
}

/* Buttons */
button {
    font-family: var(--font-primary);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.primary-btn {
    background: var(--sand-dark);
    color: white;
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 4px;
    font-weight: 500;
}

.primary-btn:hover {
    background: var(--sand-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 164, 76, 0.3);
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

#navbar h2 {
    color: var(--sand-dark);
    font-size: 24px;
    font-weight: 600;
}

.nav-right {
    display: flex;
    gap: 12px;
}

.nav-btn {
    background: transparent;
    color: var(--sand-dark);
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 4px;
}

.nav-btn:hover {
    background: var(--sand-light);
}

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

.nav-btn.primary:hover {
    background: var(--sand-medium);
}

.nav-btn.beach-btn {
    background: linear-gradient(135deg, var(--water-deep), var(--water-light));
    color: white;
    font-weight: 600;
    padding: 10px 24px;
    box-shadow: 0 2px 8px rgba(105, 173, 186, 0.3);
}

.nav-btn.beach-btn:hover {
    background: linear-gradient(135deg, var(--water-light), var(--water-deep));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(105, 173, 186, 0.4);
}

/* Canvas Container */
#canvas-container {
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Beach Labels */
.beach-label {
    position: absolute;
    pointer-events: auto; /* Changed from none to allow clicking */
    text-align: center;
    transform: translate(-50%, -100%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    max-width: 250px;
}

.beach-label:hover {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -100%) scale(1.05);
}

.beach-label .castle-name {
    color: var(--sand-dark);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.beach-label .creator-name {
    color: var(--water-deep);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.beach-label .label-comments {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(200, 164, 76, 0.2);
}

.beach-label .label-comment {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    font-style: italic;
    line-height: 1.4;
    text-align: left;
}

.beach-label .label-comment:last-child {
    margin-bottom: 0;
}

.beach-label .comment-author {
    font-size: 10px;
    color: var(--water-deep);
    font-style: normal;
    display: block;
    margin-top: 2px;
}

/* Tools Palette */
/* Camera View Controls */
#camera-controls {
    position: fixed;
    right: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
}

.view-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--sand-dark);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--sand-light);
    transform: translateX(-4px);
}

.view-btn.active {
    background: var(--sand-dark);
    color: white;
}

#toggle-labels-btn {
    margin-top: 16px;
    padding-top: 18px;
    border-top: 2px solid var(--sand-medium);
}

/* Controls Reference */
#controls-reference {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 340px;
    max-height: calc(100vh - 140px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 50;
    overflow-y: auto;
}

#controls-reference::-webkit-scrollbar {
    width: 6px;
}

#controls-reference::-webkit-scrollbar-track {
    background: rgba(240, 231, 173, 0.3);
    border-radius: 3px;
}

#controls-reference::-webkit-scrollbar-thumb {
    background: var(--sand-medium);
    border-radius: 3px;
}

#controls-reference h4 {
    color: var(--sand-dark);
    font-size: 18px;
    margin-bottom: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.control-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(200, 164, 76, 0.2);
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-section h5 {
    color: var(--water-deep);
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.control-item:last-child {
    margin-bottom: 0;
}

.control-item .key {
    background: var(--sand-light);
    color: var(--sand-dark);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
    flex-shrink: 0;
}

.control-item .action {
    color: #666;
    font-size: 11px;
    text-align: left;
    flex: 1;
    line-height: 1.4;
}

/* Horizontal Toolbar - Everything on ONE line */
#tools-palette {
    position: fixed;
    left: 0;
    top: 70px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 50;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow: visible;
}

/* Make sure all direct children don't shrink and stay inline */
#tools-palette > *:not([style*="display: none"]) {
    flex-shrink: 0;
}

.toolbar-divider {
    width: 2px;
    height: 32px;
    background: rgba(200, 164, 76, 0.3);
    margin: 0 4px;
    flex-shrink: 0;
}

.toolbar-btn {
    padding: 8px 16px;
    background: var(--sand-light);
    color: var(--sand-dark);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    flex-shrink: 0;
}

.toolbar-btn:hover {
    background: var(--sand-medium);
    color: white;
}

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

.toolbar-btn.primary:hover {
    background: var(--sand-medium);
}

/* Toolbar tool buttons (like Draw) - match dropdown button size */
.toolbar-tool {
    padding: 8px 16px;
    background: var(--sand-light);
    color: var(--sand-dark);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    flex-shrink: 0;
    width: auto;
}

.toolbar-tool:hover {
    background: var(--sand-medium);
    color: white;
}

.toolbar-tool.active {
    background: var(--sand-dark);
    color: white;
}

/* Dropdown Menus */
.tool-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.dropdown-btn {
    padding: 8px 16px;
    background: var(--sand-light);
    color: var(--sand-dark);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
    min-width: 100px;
}

.dropdown-btn:hover {
    background: var(--sand-medium);
    color: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.98);
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px;
    padding-top: 10px;
    z-index: 1000;
    border: 1px solid rgba(200, 164, 76, 0.3);
}

.tool-dropdown:hover .dropdown-content,
.tool-dropdown.active .dropdown-content {
    display: block;
}

/* Add invisible bridge to keep dropdown open when moving to content */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.dropdown-hint {
    font-size: 11px;
    color: #666;
    font-style: italic;
    padding: 4px 12px;
    margin-top: 2px;
}

.help-dropdown {
    min-width: 250px;
}

.help-dropdown .dropdown-hint:first-child {
    font-weight: 600;
    color: var(--water-deep);
    font-style: normal;
    margin-bottom: 4px;
}

.tool-btn {
    width: auto;
    background: var(--sand-light);
    color: var(--sand-dark);
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 14px;
    text-align: left;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.dropdown-content > .tool-btn {
    width: 100%;
}

/* Tool buttons inside dropdowns should be block */
.dropdown-content .tool-btn {
    display: block;
}

.tool-btn:hover {
    background: var(--sand-medium);
    color: white;
}

.tool-btn.active {
    background: var(--sand-dark);
    color: white;
}

/* Highlight action tools with green when active */
.tool-btn[data-tool="move"].active,
.tool-btn[data-tool="delete"].active,
.tool-btn[data-tool="rotate"].active,
.tool-btn[data-tool="scale"].active,
.tool-btn[data-tool="edit"].active,
.toolbar-tool[data-tool="draw"].active {
    background: #4CAF50;
    color: white;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.tool-btn[data-tool="move"]:hover,
.tool-btn[data-tool="delete"]:hover,
.tool-btn[data-tool="rotate"]:hover,
.tool-btn[data-tool="scale"]:hover,
.tool-btn[data-tool="edit"]:hover,
.toolbar-tool[data-tool="draw"]:hover:not(.active) {
    background: #66BB6A;
    color: white;
}

#castle-name {
    padding: 8px 12px;
    border: 2px solid var(--sand-light);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 14px;
    width: 180px;
    flex-shrink: 0;
}

#castle-name:focus {
    outline: none;
    border-color: var(--sand-medium);
}

/* Color Picker in Toolbar */
#sand-color-picker {
    width: 36px;
    height: 36px;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

/* Gallery View */
#gallery-view {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(240, 231, 173, 0.98);
    padding: 40px;
    overflow-y: auto;
    z-index: 90;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.gallery-header h2 {
    color: var(--sand-dark);
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-subtitle {
    color: var(--water-deep);
    font-size: 14px;
    font-style: italic;
}

.close-btn {
    background: transparent;
    color: var(--sand-dark);
    font-size: 48px;
    line-height: 1;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.close-btn:hover {
    background: rgba(200, 164, 76, 0.2);
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-group label {
    color: var(--sand-dark);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn {
    background: var(--sand-light);
    color: var(--sand-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.filter-btn.active {
    background: var(--sand-dark);
    color: white;
}

.sort-select {
    padding: 8px 16px;
    border: 2px solid var(--sand-light);
    border-radius: 20px;
    background: white;
    color: var(--sand-dark);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sort-select:hover {
    border-color: var(--sand-medium);
}

.sort-select:focus {
    outline: none;
    border-color: var(--sand-dark);
}

#gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.castle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

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

.castle-card-content {
    cursor: pointer;
}

.castle-thumbnail {
    width: 100%;
    height: 200px;
    background: var(--sand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.castle-thumbnail canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.castle-thumbnail .no-preview {
    color: var(--sand-dark);
    font-size: 14px;
    font-style: italic;
}

.castle-info {
    padding: 20px;
    flex: 1;
}

.castle-card h3 {
    color: var(--sand-dark);
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
    line-height: 1.3;
}

.castle-card .meta {
    color: var(--water-deep);
    font-size: 13px;
    margin-bottom: 6px;
}

.castle-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--sand-light);
}

.castle-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.castle-stat-icon {
    font-size: 14px;
}

.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.favorite-btn .heart {
    font-size: 20px;
    transition: all 0.2s ease;
}

.favorite-btn .heart.empty {
    color: #ccc;
}

.favorite-btn .heart.filled {
    color: #ff6b6b;
}

.favorite-btn:hover .heart.empty {
    color: #ff6b6b;
}
    margin-bottom: 12px;
}

.castle-card .status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.castle-card .status.active {
    background: var(--water-light);
    color: var(--water-deep);
}

.castle-card .status.fading {
    background: var(--sand-light);
    color: var(--sand-dark);
}

.castle-card .status.critical {
    background: #ffcccc;
    color: #cc0000;
}

.castle-card .status.memorial {
    background: #e0e0e0;
    color: #666;
}

/* Castle Detail Modal */
#castle-detail .detail-content {
    position: relative;
    background: white;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#castle-detail .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
}

#detail-name {
    color: var(--sand-dark);
    font-size: 32px;
    margin-bottom: 24px;
    font-weight: 600;
}

#detail-canvas {
    width: 100%;
    height: 300px;
    background: var(--sand-light);
    border-radius: 4px;
    margin-bottom: 24px;
}

#detail-info {
    margin-bottom: 24px;
}

#detail-info p {
    margin-bottom: 12px;
    font-size: 16px;
    color: #555;
}

#detail-info strong {
    color: var(--sand-dark);
}

/* Integrity Bar */
#detail-integrity {
    margin-top: 20px;
}

.integrity-bar {
    width: 100%;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.integrity-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sand-dark), var(--sand-medium));
    transition: width 0.5s ease;
    border-radius: 12px;
}

#integrity-percent {
    color: var(--sand-dark);
    font-size: 14px;
    font-weight: 600;
}

/* Memorial Summary */
#memorial-summary {
    margin-top: 32px;
    padding: 24px;
    background: var(--sand-light);
    border-radius: 8px;
    border-left: 4px solid var(--sand-dark);
}

#memorial-summary h3 {
    color: var(--sand-dark);
    font-size: 24px;
    margin-bottom: 16px;
    font-weight: 600;
}

#summary-text {
    color: #555;
    font-size: 18px;
    line-height: 1.7;
    font-style: italic;
}

/* Castle Image Upload Section */
#castle-image-section {
    margin: 24px 0;
    padding: 20px;
    background: var(--sand-light);
    border-radius: 8px;
    border: 2px dashed var(--sand-medium);
}

#castle-image-display {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

#castle-image-display img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.image-upload-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.secondary-btn {
    background: #999;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    font-weight: 500;
}

.secondary-btn:hover {
    background: #777;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upload-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    #navbar {
        padding: 0 20px;
    }

    #navbar h2 {
        font-size: 18px;
    }

    .nav-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    #tools-palette {
        width: 200px;
        left: 10px;
    }

    #gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Comments Section */
#comments-section {
    margin-top: 32px;
    border-top: 2px solid var(--sand-light);
    padding-top: 24px;
}

#comments-section h3 {
    color: var(--sand-dark);
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
}

#comments-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

#comments-list::-webkit-scrollbar {
    width: 6px;
}

#comments-list::-webkit-scrollbar-track {
    background: var(--sand-light);
    border-radius: 3px;
}

#comments-list::-webkit-scrollbar-thumb {
    background: var(--sand-medium);
    border-radius: 3px;
}

#comments-list::-webkit-scrollbar-thumb:hover {
    background: var(--sand-dark);
}

.comment {
    background: var(--sand-light);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--sand-medium);
}

.comment:last-child {
    margin-bottom: 0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--sand-dark);
    font-size: 14px;
}

.comment-time {
    font-size: 11px;
    color: var(--water-deep);
    font-style: italic;
}

.comment-text {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

#comment-form {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid var(--sand-light);
}

#comment-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--sand-light);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
}

#comment-input:focus {
    outline: none;
    border-color: var(--sand-medium);
}

.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#char-count {
    font-size: 12px;
    color: #666;
}

#submit-comment-btn {
    padding: 10px 24px;
    font-size: 14px;
}

/* Focused Castle Panel */
.focused-panel {
    position: fixed;
    right: 20px;
    top: 90px;
    width: 400px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 100;
    overflow: hidden;
    display: none;
}

.panel-header {
    background: var(--sand-dark);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.close-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

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

.panel-content {
    padding: 20px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

.panel-info p {
    margin: 8px 0;
    color: #555;
    font-size: 14px;
}

.panel-info strong {
    color: var(--sand-dark);
}

.panel-memorial {
    margin: 20px 0;
    padding: 16px;
    background: var(--sand-light);
    border-radius: 6px;
    border-left: 4px solid var(--water-deep);
}

.panel-memorial h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: var(--water-deep);
}

.panel-memorial p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.panel-comments {
    margin-top: 24px;
}

.panel-comments h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--sand-dark);
}

.focused-comment {
    background: var(--sand-light);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.focused-comment .comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.focused-comment .comment-author {
    font-weight: 600;
    color: var(--water-deep);
}

.focused-comment .comment-time {
    color: #999;
}

.focused-comment .comment-text {
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

.no-comments {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

#focused-comment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--sand-light);
}

#focused-comment-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--sand-light);
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 12px;
}

#focused-comment-input:focus {
    outline: none;
    border-color: var(--sand-medium);
}

#focused-comment-form .primary-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}
