/**
 * WordPress Styling for Word Puzzle Squares
 * This ensures proper styling of game elements in the WordPress environment
 */

/* Dark Mode Styles */
.wps-dark-mode {
    --wps-bg-primary: #222222;
    --wps-bg-secondary: #333333;
    --wps-bg-tertiary: #444444;
    --wps-text-primary: #e0e0e0;
    --wps-text-secondary: #b0b0b0;
    --wps-accent-color: #38B6FF;
    --wps-border-color: #555555;
    --wps-success-color: #4BB543;
    --wps-error-color: #dc3545;
    --wps-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    --wps-cell-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --wps-cell-selected: #2C7AB8;
    transition: all 0.3s ease;
}

/* Container */
.wps-container {
    position: relative;
    max-width: 740px;
    margin: 0 auto;
    text-align: center;
    font-family: Arial, sans-serif;
    border: 2px solid var(--wps-border-color, #e0e0e0);
    border-radius: 16px;
    padding: 15px 10px;
    background: var(--wps-bg-primary, #ffffff);
    box-shadow: var(--wps-box-shadow, 0 2px 8px rgba(0,0,0,0.05));
    transition: all 0.3s ease;
}

/* Error container */
#error-container {
    color: red;
    padding: 20px;
    text-align: center;
    display: none;
}

/* Game layout */
.wps-game-layout {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    margin: 20px auto;
    width: 100%;
    max-width: 720px;
}

/* Left column containing board and controls */
.wps-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

/* Game board container */
.wps-game-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(65px, 1fr));
    grid-template-rows: repeat(4, minmax(65px, 1fr));
    gap: 12px;
    padding: 20px;
    background: var(--wps-bg-secondary, #f7f7f9);
    border-radius: 12px;
    position: relative;
    max-width: 400px;
    width: 400px;
    height: 400px;
    z-index: 0;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Game cells */
.wps-game-cell {
    background: var(--wps-bg-primary, white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: var(--wps-text-primary, #000000);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    box-shadow: var(--wps-cell-shadow, 0 1px 2px rgba(0,0,0,0.05));
    min-height: 65px;
    width: 100%;
    position: relative;
}

.wps-game-cell:hover {
    transform: scale(1.05);
    box-shadow: var(--wps-box-shadow);
}

.wps-game-cell.selected {
    background: var(--wps-cell-selected, #caeafc);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(56, 182, 255, 0.6);
    z-index: 2;
    transition: all 0.2s ease;
}

.wps-game-cell.selected::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(56, 182, 255, 0.3);
    border-radius: 10px;
    z-index: -1;
    left: 0;
    top: 0;
    mix-blend-mode: overlay;
    transition: all 0.2s ease;
}

.wps-dark-mode .wps-game-cell.selected {
    box-shadow: 0 0 15px rgba(44, 122, 184, 0.8);
    color: white;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

.wps-dark-mode .wps-game-cell.selected::after {
    background: rgba(100, 200, 255, 0.4);
    mix-blend-mode: screen;
}

.wps-game-cell.orange {
    color: #000000;
}

.wps-letter-count {
    position: absolute;
    right: 5px;
    bottom: 5px;
    font-size: 12px;
    font-weight: normal;
    color: var(--wps-text-secondary, #666);
    transition: all 0.3s ease;
}

/* Word tracker */
.wps-word-tracker {
    width: 300px;
    min-width: 300px;
    background: var(--wps-bg-primary, #fff);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--wps-box-shadow, 0 2px 8px rgba(0,0,0,0.1));
    text-align: left;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    flex-shrink: 0;
    padding-top: 60px;
    transition: all 0.3s ease;
}

.wps-sort-options {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wps-border-color, #eee);
}

.wps-sort-button {
    flex: 1;
    padding: 8px;
    border: none;
    background: var(--wps-bg-secondary, #f5f5f5);
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--wps-text-secondary, #666);
    transition: all 0.3s ease;
}

.wps-sort-button:hover {
    background: var(--wps-accent-color, #38B6FF);
    color: white;
    opacity: 0.8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wps-sort-button.active {
    background: var(--wps-accent-color, #38B6FF);
    color: white;
}

.wps-words-found {
    font-size: 16px;
    color: var(--wps-text-primary, #333);
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.wps-words-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.wps-length-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wps-length-header {
    font-size: 14px;
    color: var(--wps-text-secondary, #666);
    font-weight: bold;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.wps-remaining-count {
    font-size: 13px;
    color: var(--wps-text-secondary, #888);
    font-weight: normal;
    display: inline-block;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.wps-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wps-word-item {
    padding: 4px 8px;
    background: var(--wps-bg-secondary, #f5f5f5);
    border-radius: 4px;
    font-size: 14px;
    color: var(--wps-text-secondary, #999);
    display: inline-block;
    margin: 3px;
    transition: all 0.3s ease;
}

.wps-word-item.found {
    background: #e8f7e8;
    color: #28a745;
    font-weight: bold;
}

.wps-word-item.bonus {
    color: #ff8800;
}

.wps-word-item.bonus.found {
    background: #fff3e0;
}

.wps-word-of-day {
    border-left: 3px solid #ff8800;
}

/* Word preview */
.wps-word-preview {
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
    padding: 5px;
    margin: 5px 0;
    height: 25px;
    line-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wps-word-preview.too-short {
    color: #666;
}

.wps-word-preview.valid {
    color: #28a745;
}

.wps-word-preview.invalid {
    color: #dc3545;
}

/* Game controls */
.wps-game-controls {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    width: 400px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.wps-control-button {
    background: var(--wps-bg-secondary, #f7f7f9);
    border: none;
    border-radius: 10px;
    width: 48px;
    height: 48px;
    cursor: pointer;
    font-size: 20px;
    color: var(--wps-text-primary, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--wps-cell-shadow, 0 1px 2px rgba(0,0,0,0.05));
    position: relative;
}

.wps-control-button:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: var(--wps-box-shadow);
}

.wps-control-button i {
    font-size: 20px;
    display: inline-block;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
}

.wps-control-button:hover i {
    color: var(--wps-accent-color, #38B6FF);
}

/* Tooltip styles */
.wps-control-button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    z-index: 10;
    pointer-events: none;
}

.wps-control-button:hover::after {
    opacity: 1;
    visibility: visible;
}

.wps-hint-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #38B6FF;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Points gauge */
.wps-points-gauge {
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.wps-gauge-bar {
    width: 100%;
    height: 12px;
    background: var(--wps-bg-tertiary, #e0e0e0);
    border-radius: 6px;
    margin: 5px 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.wps-gauge-progress {
    height: 100%;
    background: #38B6FF;
    width: 0;
    transition: width 0.3s ease;
    border-radius: 6px;
}

.wps-gauge-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
}

.wps-gauge-current {
    color: #38B6FF;
}

.wps-gauge-total {
    color: var(--wps-text-secondary, #666);
    transition: all 0.3s ease;
}

/* Score display */
.wps-score-display {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #4BB543;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Message container */
.wps-message-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

/* Connection lines */
.wps-connection-line {
    position: absolute;
    height: 20px;
    background: rgba(56, 182, 255, 0.6);
    transform-origin: 0 50%;
    pointer-events: none;
    z-index: 1;
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(56, 182, 255, 0.4);
    transition: all 0.1s ease;
    mix-blend-mode: normal;
}

.wps-dark-mode .wps-connection-line {
    background: rgba(100, 200, 255, 0.7);
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
    mix-blend-mode: normal;
}

/* Messages */
.wps-message {
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wps-message.success {
    background: rgba(40, 167, 69, 0.9);
}

.wps-message.error {
    background: rgba(220, 53, 69, 0.9);
}

/* Animations */
@keyframes successPulse {
    0% { transform: scale(1.1); background: #38B6FF; }
    50% { transform: scale(1.2); background: #28a745; }
    100% { transform: scale(1); background: white; }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(-50%); }
    25% { transform: translateX(-60%); }
    75% { transform: translateX(-40%); }
}

/* Success and error states */
.wps-game-cell.success {
    animation: successPulse 0.5s ease;
}

.wps-game-cell.error {
    animation: errorShake 0.5s ease;
}

.wps-word-preview.wps-word-error {
    color: #dc3545;
    animation: shake 0.5s ease;
}

/* Rotation animation */
@keyframes rotate90 {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(90deg);
    }
}

.wps-game-board.rotating {
    animation: rotate90 0.5s ease-in-out;
}

/* Responsive design */
@media (max-width: 768px) {
    .wps-game-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .wps-left-column {
        width: 100%;
        max-width: 350px;
    }
    
    .wps-game-controls {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .wps-game-board {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }
    
    .wps-word-tracker {
        width: 100%;
        max-width: 400px;
        margin-top: 20px;
    }
    
    .wps-game-cell {
        min-height: 50px;
        font-size: 20px;
    }
}

@media (min-width: 769px) {
    .wps-game-layout {
        flex-direction: row;
    }
    
    .wps-word-tracker {
        width: 300px;
        margin-top: 0;
    }
}

/* Create a container for the entire game area */
.wps-game-area {
    position: relative;
    margin: 0 auto;
}

/* Debug modal styles */
.wps-debug-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wps-debug-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    width: 600px;
    overflow-y: auto;
    position: relative;
}

.wps-debug-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.wps-debug-close:hover {
    color: #333;
}

.wps-debug-words-container {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wps-debug-section h3 {
    margin: 0 0 10px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.wps-debug-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wps-debug-word {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    cursor: default;
}

.wps-debug-word.found {
    background: #e8f7e8;
    color: #28a745;
    font-weight: bold;
}

.wps-debug-word.bonus {
    background: #fff3e0;
    color: #ff8800;
}

.wps-debug-word.bonus.found {
    background: #ffe0b2;
    color: #e65100;
    font-weight: bold;
}

.wps-debug-word.word-of-day {
    border-left: 3px solid #ff8800;
    padding-left: 7px;
}

.wps-debug-button {
    background-color: #f44336;
    color: white;
}

.wps-debug-button:hover {
    background-color: #d32f2f;
}

/* Date selector modal styles */
.wps-date-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wps-date-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 90%;
    width: 400px;
    position: relative;
}

.wps-date-modal-content h2 {
    margin: 0 0 20px 0;
    text-align: center;
    color: #333;
}

.wps-date-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.wps-date-close:hover {
    color: #333;
}

.wps-date-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wps-date-button {
    padding: 15px;
    background: #f7f7f9;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wps-date-button:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.wps-date-button.wps-date-button-active {
    background: #38B6FF;
    color: white;
}

.wps-date-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Controls row for better organization */
.wps-controls-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.wps-control-button.wps-date-button {
    background-color: #4CAF50;
    color: white;
}

.wps-control-button.wps-date-button:hover {
    background-color: #3e8e41;
}

.wps-debug-reload {
    padding: 8px 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 0 20px;
    display: block;
    width: 100%;
    transition: background-color 0.3s ease;
}

.wps-debug-reload:hover {
    background: #0b7dda;
}

.wps-debug-info {
    margin-top: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    border-left: 4px solid #2196F3;
}

.wps-debug-info p {
    margin: 0;
    font-family: monospace;
    line-height: 1.5;
}

.wps-debug-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
}

.wps-debug-stats ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

.wps-debug-stats li {
    margin-bottom: 5px;
}

.wps-debug-board-section {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.wps-debug-board-grid {
    max-width: 200px;
    margin: 0 auto;
}

.wps-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.wps-loading-container {
    text-align: center;
    transform: translateY(-10%);
}

.wps-loading-tiles {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.wps-loading-tile {
    width: 40px;
    height: 40px;
    background: #38B6FF;
    color: white;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    animation: tileRotate 2s infinite ease-in-out;
    box-shadow: 0 2px 8px rgba(56, 182, 255, 0.3);
}

.wps-loading-tile:nth-child(1) { animation-delay: 0s; }
.wps-loading-tile:nth-child(2) { animation-delay: 0.2s; }
.wps-loading-tile:nth-child(3) { animation-delay: 0.4s; }
.wps-loading-tile:nth-child(4) { animation-delay: 0.6s; }

.wps-loading-text {
    font-size: 18px;
    color: #333;
    margin-top: 20px;
    animation: textPulse 2s infinite ease-in-out;
}

@keyframes tileRotate {
    0% {
        transform: perspective(400px) rotateY(0);
        background: #38B6FF;
    }
    50% {
        transform: perspective(400px) rotateY(180deg);
        background: #2196F3;
    }
    100% {
        transform: perspective(400px) rotateY(360deg);
        background: #38B6FF;
    }
}

@keyframes textPulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Celebration Message */
.wps-celebration-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 24px;
    text-align: center;
    z-index: 1000;
    animation: celebrationFade 2s ease-in-out forwards;
}

/* Confetti Container */
.wps-confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Confetti Piece */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    animation: confettiFall 2s ease-in-out forwards;
}

/* Celebration Animation */
@keyframes celebrationFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -70%);
    }
}

/* Confetti Animation */
@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.wps-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.wps-share-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wps-share-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.wps-share-close:hover {
    color: #333;
}

.wps-share-text-display {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
}

.wps-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.wps-share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    gap: 10px;
}

.wps-share-button i {
    font-size: 20px;
}

/* X (Twitter) Button */
.wps-share-x {
    background-color: #000000;
}

.wps-share-x:hover {
    background-color: #333333;
}

/* Facebook Button */
.wps-share-facebook {
    background-color: #1877F2;
}

.wps-share-facebook:hover {
    background-color: #1559b8;
}

/* WhatsApp Button */
.wps-share-whatsapp {
    background-color: #25D366;
}

.wps-share-whatsapp:hover {
    background-color: #1ea952;
}

/* Reddit Button */
.wps-share-reddit {
    background-color: #FF4500;
}

.wps-share-reddit:hover {
    background-color: #d93a00;
}

/* Share Text Display */
.wps-share-text-display {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    white-space: pre-wrap;
    margin: 15px 0;
}

/* Help Button */
.wps-help-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--wps-bg-secondary, #f7f7f9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
    box-shadow: var(--wps-cell-shadow, 0 1px 2px rgba(0,0,0,0.05));
    z-index: 1;
}

.wps-help-button:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: var(--wps-box-shadow);
}

.wps-help-button i {
    font-size: 16px;
    display: inline-block;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
}

.wps-help-button:hover i {
    color: var(--wps-accent-color, #38B6FF);
}

/* Help Modal */
.wps-help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.wps-help-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wps-help-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.wps-help-close:hover {
    color: #333;
}

.wps-help-section {
    margin-bottom: 16px;
    max-width: 400px;
}

.wps-help-section h2 {
    color: #333;
    font-size: 20px;
    margin: 0 0 8px 0;
}

.wps-help-section h3 {
    color: #444;
    font-size: 16px;
    margin: 12px 0 6px 0;
}

.wps-help-section p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 8px 0;
    max-width: 380px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wps-help-modal-content {
        padding: 15px;
        width: 95%;
    }
    
    .wps-help-section h2 {
        font-size: 18px;
    }
    
    .wps-help-section h3 {
        font-size: 15px;
    }
    
    .wps-help-section p {
        font-size: 13px;
        line-height: 1.3;
    }
}

/* Settings Button */
.wps-settings-button {
    position: absolute;
    top: 20px;
    right: 92px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--wps-bg-secondary, #f7f7f9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
    box-shadow: var(--wps-cell-shadow, 0 1px 2px rgba(0,0,0,0.05));
    z-index: 1;
}

.wps-settings-button:hover {
    background: white;
    transform: scale(1.05);
    box-shadow: var(--wps-box-shadow);
}

.wps-settings-button i {
    font-size: 16px;
    display: inline-block;
    color: var(--wps-text-primary, #333);
    transition: all 0.3s ease;
}

.wps-settings-button:hover i {
    color: var(--wps-accent-color, #38B6FF);
}

/* Settings Modal */
.wps-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.wps-settings-modal-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wps-settings-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.wps-settings-close:hover {
    color: #333;
}

.wps-settings-section {
    margin-bottom: 20px;
}

.wps-settings-section h2 {
    color: #333;
    font-size: 20px;
    margin: 0 0 15px 0;
}

/* Toggle Switch */
.wps-toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.wps-toggle-label {
    font-size: 14px;
    color: #666;
}

.wps-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.wps-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wps-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.wps-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.wps-toggle input:checked + .wps-toggle-slider {
    background-color: #38B6FF;
}

.wps-toggle input:checked + .wps-toggle-slider:before {
    transform: translateX(20px);
}

/* Feedback Link */
.wps-feedback-link {
    display: block;
    margin-top: 10px;
    color: #38B6FF;
    text-decoration: none;
    font-size: 14px;
}

.wps-feedback-link:hover {
    text-decoration: underline;
}

.wps-dark-mode .wps-sort-button {
    background: var(--wps-bg-tertiary, #444444);
    color: var(--wps-text-secondary, #b0b0b0);
}

.wps-dark-mode .wps-sort-button:hover {
    background: var(--wps-accent-color, #38B6FF);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wps-dark-mode .wps-sort-button.active {
    background: var(--wps-accent-color, #38B6FF);
    color: white;
} 