/* Card Panel Styles - Folder Design */
.card-panel {
    border-radius: 0 8px 8px 8px;
    padding: 0;
    margin-bottom: 32px;
    transition: all 0.3s ease;
    position: relative;
}

/* Folder Tabs */
.folder-tabs {
    display: flex;
    padding: 0;
    margin: 0;
    background-color: transparent;
}

.folder-tab.main-tab {
    background-color: #ffffff;
    padding: 8px 20px;
    cursor: default;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
    width: 200px;
    clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 100%, 0 100%);
}

.folder-tab.main-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #ffffff;
    z-index: 3;
}

.main-title {
    font-size: 18px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 3px;
}

.alt-titles {
    font-size: 13px;
    font-weight: normal;
    color: #666666;
    line-height: 1.2;
}

.card-panel-content {
    text-align: center;
    padding: 24px;
    min-height: 200px;
    line-height: 50px;
    background-color: #ffffff;
    background-image: url('../resources/card_bkg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border-radius: 0 8px 8px 8px;
    vertical-align: middle;
    position: relative;
}

.card-panel-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../resources/card_bkg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
    border-radius: 0 8px 8px 8px;
    vertical-align: middle;
}

.card-panel-content > * {
    position: relative;
    vertical-align: middle;
    z-index: 1;
}

/* Global Theme Toggle Switch (in top bar) */
#global-theme-toggle.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

#global-theme-toggle .toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#global-theme-toggle .toggle-switch:hover {
    background-color: #b3b3b3;
}

#global-theme-toggle .toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#global-theme-toggle .toggle-switch.active {
    background-color: #4a90e2;
}

#global-theme-toggle .toggle-switch.active:hover {
    background-color: #357abd;
}

#global-theme-toggle .toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

body.dark-mode #global-theme-toggle .toggle-switch {
    background-color: #555;
}

body.dark-mode #global-theme-toggle .toggle-switch:hover {
    background-color: #666;
}

/* Dark Mode Styles */

.card-panel.dark-mode .folder-tab.main-tab {
    background-color: #2d2d2d;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.card-panel.dark-mode .folder-tab.main-tab::after {
    background-color: #2d2d2d;
}

.card-panel.dark-mode .main-title {
    color: #ffffff;
}

.card-panel.dark-mode .alt-titles {
    color: #aaaaaa;
}

.card-panel.dark-mode .card-panel-content {
    background-color: #2d2d2d;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.card-panel.dark-mode .card-panel-content::before {
    opacity: 0.08;
}

/* Adjust existing content styles for dark mode */
.card-panel.dark-mode #produce-idols,
.card-panel.dark-mode #meshi-gallery,
.card-panel.dark-mode #produce-records,
.card-panel.dark-mode #contacts {
    color: #ffffff;
}

/* Icon styles for global theme toggle */
#global-theme-toggle .theme-icon {
    font-size: 20px;
    display: inline-block;
    transition: opacity 0.3s ease;
}

#global-theme-toggle .theme-icon.sun {
    color: #ffa500;
}

#global-theme-toggle .theme-icon.moon {
    color: #4a90e2;
}

body.dark-mode #global-theme-toggle .theme-icon.moon {
    color: #6bb6ff;
}

/* Responsive adjustments */
@media (orientation: portrait) {
    .folder-tab.main-tab {
        padding: 7px 14px;
        width: 160px;
    }
    
    .main-title {
        font-size: 16px;
        margin-bottom: 2px;
    }
    
    .alt-titles {
        font-size: 11px;
    }
    
    .card-panel-content {
        padding: 16px;
    }
}
