/* ================= GAMES & FUN TOOLS - MASTER CSS ================= */

/* Root Variables - Using admin panel colors */
:root {
    --primary: var(--main-color);
    --primary-hover: color-mix(in srgb, var(--main-color), black 15%);
    --card-bg: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.25s ease;
}

/* Dark Mode Variables */
body.dark {
    --card-bg: #1e293b;
    --bg-light: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* ================= DICE ROLLER TOOL ================= */
.dice-roller-page .dice-roller-container {
    max-width: 700px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.dice-roller-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.dice-roller-page .dice-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.dice-roller-page .settings-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.dice-roller-page .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.dice-roller-page .form-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.dice-roller-page .input-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0 12px;
}

.dice-roller-page .value-input {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-main);
}

.dice-roller-page .value-input:focus {
    outline: none;
}

.dice-roller-page .value-select {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-main);
    cursor: pointer;
}

.dice-roller-page .value-select:focus {
    outline: none;
}

.dice-roller-page .dice-arena {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    margin-bottom: 20px;
    min-height: 160px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.dice-roller-page .dice-arena.rolling {
    transform: scale(0.98);
}

.dice-roller-page .dice-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.dice-roller-page .dice-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.dice-roller-page .dice-placeholder span {
    display: block;
    font-size: 13px;
}

.dice-roller-page .dice-item {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    width: 65px;
    height: 65px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.dice-roller-page .dice-item:hover {
    transform: scale(1.05);
}

.dice-roller-page .dice-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.dice-roller-page .dice-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.dice-roller-page .results-section {
    background: linear-gradient(135deg, var(--bg-light), var(--card-bg));
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.dice-roller-page .total-box {
    margin-bottom: 10px;
}

.dice-roller-page .total-box span {
    font-size: 12px;
    color: var(--text-muted);
}

.dice-roller-page .total-box h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 5px 0;
}

.dice-roller-page .roll-details p {
    font-size: 13px;
    color: var(--text-muted);
    word-break: break-word;
}

.dice-roller-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.dice-roller-page .action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.dice-roller-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.dice-roller-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.dice-roller-page .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.dice-roller-page .btn-danger:hover {
    background: #dc2626;
}

.dice-roller-page .history-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dice-roller-page .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.dice-roller-page .history-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.dice-roller-page .history-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.dice-roller-page .clear-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.dice-roller-page .clear-btn:hover {
    background: var(--border-color);
}

.dice-roller-page .history-list {
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
}

.dice-roller-page .history-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.dice-roller-page .history-text {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 5px;
    font-weight: 500;
}

.dice-roller-page .history-result {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-family: monospace;
}

.dice-roller-page .history-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.dice-roller-page .history-actions {
    display: flex;
    gap: 8px;
}

.dice-roller-page .history-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.dice-roller-page .history-delete:hover {
    background: #ef4444;
    color: white;
}

.dice-roller-page .history-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.dice-roller-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.dice-roller-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.dice-roller-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.dice-roller-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.dice-roller-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.dice-roller-page header h1,
.dice-roller-page h1 {
    color: var(--primary) !important;
}

.dice-roller-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.dice-roller-page .tool-info,
.dice-roller-page .tool-instructions,
.dice-roller-page .tool-faqs {
    padding: 0 20px;
}

.dice-roller-page .tool-instructions details,
.dice-roller-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.dice-roller-page .tool-instructions summary,
.dice-roller-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.dice-roller-page .tool-instructions summary i,
.dice-roller-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .dice-roller-page .tool-instructions summary,
body.dark .dice-roller-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .dice-roller-page .tool-instructions summary i,
body.dark .dice-roller-page .tool-faqs summary i {
    color: #000000 !important;
}

.dice-roller-page .tool-instructions ul,
.dice-roller-page .tool-instructions p,
.dice-roller-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .dice-roller-page .dice-roller-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .dice-roller-page .workspace {
        padding: 10px;
    }
    
    .dice-roller-page .dice-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .dice-roller-page .settings-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .dice-roller-page .form-group label {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .dice-roller-page .input-ctrl {
        padding: 0 10px;
    }
    
    .dice-roller-page .value-input,
    .dice-roller-page .value-select {
        padding: 10px 0;
        font-size: 14px;
    }
    
    .dice-roller-page .dice-arena {
        padding: 20px 15px;
        min-height: 120px;
    }
    
    .dice-roller-page .dice-item {
        width: 55px;
        height: 55px;
    }
    
    .dice-roller-page .dice-value {
        font-size: 1.4rem;
    }
    
    .dice-roller-page .results-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .dice-roller-page .total-box h2 {
        font-size: 2rem;
    }
    
    .dice-roller-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .dice-roller-page .action-footer {
        gap: 8px;
        flex-direction: column;
    }
    
    .dice-roller-page .btn-primary,
    .dice-roller-page .btn-danger {
        padding: 8px 12px;
        font-size: 12px;
        width: 100%;
    }
    
    .dice-roller-page .history-header {
        padding: 8px 12px;
    }
    
    .dice-roller-page .history-header h3 {
        font-size: 13px;
    }
    
    .dice-roller-page .history-list {
        padding: 10px;
        max-height: 220px;
    }
    
    .dice-roller-page .history-item {
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .dice-roller-page .history-text,
    .dice-roller-page .history-result {
        font-size: 11px;
    }
    
    .dice-roller-page .history-time {
        font-size: 9px;
        margin-bottom: 5px;
    }
    
    .dice-roller-page .history-delete {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    .dice-roller-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .dice-roller-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .dice-roller-page .tips-grid {
        gap: 8px;
    }
    
    .dice-roller-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .dice-roller-page .tool-info,
    .dice-roller-page .tool-instructions,
    .dice-roller-page .tool-faqs {
        padding: 0 12px;
    }
    
    .dice-roller-page .tool-instructions details,
    .dice-roller-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .dice-roller-page .tool-instructions summary,
    .dice-roller-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .dice-roller-page .tool-instructions ul,
    .dice-roller-page .tool-instructions p,
    .dice-roller-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .dice-roller-page header h1,
    .dice-roller-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .dice-roller-page .subtitle {
        font-size: 12px;
    }
}

/* ================= FUTURE GAMES & FUN TOOLS WILL GO HERE ================= */
/* Example: Coin Flip, Fortune Teller, Rock Paper Scissors, etc. */

/* ================= FLIP A COIN TOOL ================= */
.flip-coin-page .flip-coin-container {
    max-width: 600px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.flip-coin-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.flip-coin-page .coin-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.flip-coin-page .coin-arena {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    perspective: 1000px;
}

.flip-coin-page .coin {
    width: 180px;
    height: 180px;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s;
}

.flip-coin-page .coin-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.3, 1);
    border-radius: 50%;
}

.flip-coin-page .coin.flipping .coin-inner {
    transform: rotateY(1080deg);
}

.flip-coin-page .coin-front,
.flip-coin-page .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f1c40f, #f39c12);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 3px solid #e67e22;
}

.flip-coin-page .coin-front {
    transform: rotateY(0deg);
}

.flip-coin-page .coin-back {
    transform: rotateY(180deg);
}

.flip-coin-page .coin-front i,
.flip-coin-page .coin-back i {
    font-size: 3rem;
    color: #e67e22;
    margin-bottom: 10px;
}

.flip-coin-page .coin-front span,
.flip-coin-page .coin-back span {
    font-size: 1.2rem;
    font-weight: 800;
    color: #e67e22;
    letter-spacing: 2px;
}

.flip-coin-page .results-section {
    text-align: center;
    margin-bottom: 25px;
}

.flip-coin-page .result-box {
    background: linear-gradient(135deg, var(--bg-light), var(--card-bg));
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}

.flip-coin-page .result-placeholder {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin: 0;
}

.flip-coin-page .result-box h2 {
    font-size: 1.8rem;
    margin: 0;
    transition: all 0.3s ease;
}

.flip-coin-page .stats-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 15px 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.flip-coin-page .stat {
    text-align: center;
    flex: 1;
}

.flip-coin-page .stat span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.flip-coin-page .stat span i {
    margin-right: 5px;
    color: var(--primary);
}

.flip-coin-page .stat strong {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.flip-coin-page .stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

.flip-coin-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.flip-coin-page .action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.flip-coin-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.flip-coin-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.flip-coin-page .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.flip-coin-page .btn-danger:hover {
    background: #dc2626;
}

.flip-coin-page .history-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.flip-coin-page .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.flip-coin-page .history-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.flip-coin-page .history-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.flip-coin-page .clear-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.flip-coin-page .clear-btn:hover {
    background: var(--border-color);
}

.flip-coin-page .history-list {
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.flip-coin-page .history-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.flip-coin-page .history-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.flip-coin-page .history-time {
    font-size: 10px;
    color: var(--text-muted);
}

.flip-coin-page .history-actions {
    display: flex;
    gap: 8px;
}

.flip-coin-page .history-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.flip-coin-page .history-delete:hover {
    background: #ef4444;
    color: white;
}

.flip-coin-page .history-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.flip-coin-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.flip-coin-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.flip-coin-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.flip-coin-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.flip-coin-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.flip-coin-page header h1,
.flip-coin-page h1 {
    color: var(--primary) !important;
}

.flip-coin-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.flip-coin-page .tool-info,
.flip-coin-page .tool-instructions,
.flip-coin-page .tool-faqs {
    padding: 0 20px;
}

.flip-coin-page .tool-instructions details,
.flip-coin-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.flip-coin-page .tool-instructions summary,
.flip-coin-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.flip-coin-page .tool-instructions summary i,
.flip-coin-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .flip-coin-page .tool-instructions summary,
body.dark .flip-coin-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .flip-coin-page .tool-instructions summary i,
body.dark .flip-coin-page .tool-faqs summary i {
    color: #000000 !important;
}

.flip-coin-page .tool-instructions ul,
.flip-coin-page .tool-instructions p,
.flip-coin-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .flip-coin-page .flip-coin-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .flip-coin-page .workspace {
        padding: 10px;
    }
    
    .flip-coin-page .coin-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .flip-coin-page .coin {
        width: 130px;
        height: 130px;
    }
    
    .flip-coin-page .coin-front i,
    .flip-coin-page .coin-back i {
        font-size: 2rem;
    }
    
    .flip-coin-page .coin-front span,
    .flip-coin-page .coin-back span {
        font-size: 0.9rem;
    }
    
    .flip-coin-page .result-box h2 {
        font-size: 1.3rem;
    }
    
    .flip-coin-page .stats-box {
        padding: 12px 15px;
    }
    
    .flip-coin-page .stat strong {
        font-size: 1.4rem;
    }
    
    .flip-coin-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .flip-coin-page .action-footer {
        gap: 8px;
        flex-direction: column;
    }
    
    .flip-coin-page .btn-primary,
    .flip-coin-page .btn-danger {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
    }
    
    .flip-coin-page .history-header {
        padding: 8px 12px;
    }
    
    .flip-coin-page .history-header h3 {
        font-size: 13px;
    }
    
    .flip-coin-page .history-list {
        padding: 10px;
        max-height: 220px;
    }
    
    .flip-coin-page .history-item {
        padding: 10px;
    }
    
    .flip-coin-page .history-text {
        font-size: 12px;
    }
    
    .flip-coin-page .history-time {
        font-size: 9px;
    }
    
    .flip-coin-page .history-delete {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    .flip-coin-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .flip-coin-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .flip-coin-page .tips-grid {
        gap: 8px;
    }
    
    .flip-coin-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .flip-coin-page .tool-info,
    .flip-coin-page .tool-instructions,
    .flip-coin-page .tool-faqs {
        padding: 0 12px;
    }
    
    .flip-coin-page .tool-instructions details,
    .flip-coin-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .flip-coin-page .tool-instructions summary,
    .flip-coin-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .flip-coin-page .tool-instructions ul,
    .flip-coin-page .tool-instructions p,
    .flip-coin-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .flip-coin-page header h1,
    .flip-coin-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .flip-coin-page .subtitle {
        font-size: 12px;
    }
}
/* ================= COUNTDOWN TIMER TOOL ================= */
.countdown-timer-page .countdown-timer-container {
    max-width: 600px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.countdown-timer-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.countdown-timer-page .timer-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.countdown-timer-page .timer-display-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.countdown-timer-page .progress-ring {
    width: 240px;
    height: 240px;
    transform: rotate(-90deg);
}

.countdown-timer-page .progress-ring-bg {
    stroke: var(--border-color);
}

.countdown-timer-page .progress-ring-circle {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.countdown-timer-page .timer-text {
    position: absolute;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    text-align: center;
}

.countdown-timer-page .timer-text.timer-done {
    color: #ef4444;
    animation: pulse 0.5s ease-in-out 3;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.countdown-timer-page .time-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.countdown-timer-page .input-group {
    text-align: center;
}

.countdown-timer-page .input-group .time-input {
    width: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.2rem;
    text-align: center;
    background: var(--card-bg);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
}

.countdown-timer-page .input-group .time-input:focus {
    outline: none;
    border-color: var(--primary);
}

.countdown-timer-page .input-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.countdown-timer-page .colon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.countdown-timer-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.countdown-timer-page .action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.countdown-timer-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.countdown-timer-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.countdown-timer-page .btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.countdown-timer-page .btn-secondary:hover {
    background: var(--border-color);
}

.countdown-timer-page .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.countdown-timer-page .btn-danger:hover {
    background: #dc2626;
}

.countdown-timer-page .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.countdown-timer-page .hidden {
    display: none;
}

.countdown-timer-page .history-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.countdown-timer-page .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.countdown-timer-page .history-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.countdown-timer-page .history-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.countdown-timer-page .clear-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.countdown-timer-page .clear-btn:hover {
    background: var(--border-color);
}

.countdown-timer-page .history-list {
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.countdown-timer-page .history-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.countdown-timer-page .history-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.countdown-timer-page .history-time {
    font-size: 10px;
    color: var(--text-muted);
}

.countdown-timer-page .history-actions {
    display: flex;
    gap: 8px;
}

.countdown-timer-page .history-use,
.countdown-timer-page .history-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.countdown-timer-page .history-use:hover {
    background: var(--primary);
    color: white;
}

.countdown-timer-page .history-delete:hover {
    background: #ef4444;
    color: white;
}

.countdown-timer-page .history-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.countdown-timer-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.countdown-timer-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.countdown-timer-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.countdown-timer-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.countdown-timer-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.countdown-timer-page header h1,
.countdown-timer-page h1 {
    color: var(--primary) !important;
}

.countdown-timer-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.countdown-timer-page .tool-info,
.countdown-timer-page .tool-instructions,
.countdown-timer-page .tool-faqs {
    padding: 0 20px;
}

.countdown-timer-page .tool-instructions details,
.countdown-timer-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.countdown-timer-page .tool-instructions summary,
.countdown-timer-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.countdown-timer-page .tool-instructions summary i,
.countdown-timer-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .countdown-timer-page .tool-instructions summary,
body.dark .countdown-timer-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .countdown-timer-page .tool-instructions summary i,
body.dark .countdown-timer-page .tool-faqs summary i {
    color: #000000 !important;
}

.countdown-timer-page .tool-instructions ul,
.countdown-timer-page .tool-instructions p,
.countdown-timer-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .countdown-timer-page .countdown-timer-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .countdown-timer-page .workspace {
        padding: 10px;
    }
    
    .countdown-timer-page .timer-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .countdown-timer-page .progress-ring {
        width: 180px;
        height: 180px;
    }
    
    .countdown-timer-page .timer-text {
        font-size: 1.4rem;
    }
    
    .countdown-timer-page .time-inputs {
        gap: 8px;
    }
    
    .countdown-timer-page .input-group .time-input {
        width: 60px;
        padding: 8px;
        font-size: 1rem;
    }
    
    .countdown-timer-page .colon {
        font-size: 1.2rem;
    }
    
    .countdown-timer-page .input-group label {
        font-size: 9px;
    }
    
    .countdown-timer-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .countdown-timer-page .action-footer {
        gap: 8px;
        flex-direction: column;
    }
    
    .countdown-timer-page .btn-primary,
    .countdown-timer-page .btn-secondary,
    .countdown-timer-page .btn-danger {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
    }
    
    .countdown-timer-page .history-header {
        padding: 8px 12px;
    }
    
    .countdown-timer-page .history-header h3 {
        font-size: 13px;
    }
    
    .countdown-timer-page .history-list {
        padding: 10px;
        max-height: 220px;
    }
    
    .countdown-timer-page .history-item {
        padding: 10px;
    }
    
    .countdown-timer-page .history-text {
        font-size: 11px;
    }
    
    .countdown-timer-page .history-time {
        font-size: 9px;
    }
    
    .countdown-timer-page .history-use,
    .countdown-timer-page .history-delete {
        padding: 2px 8px;
        font-size: 9px;
    }
    
    .countdown-timer-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .countdown-timer-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .countdown-timer-page .tips-grid {
        gap: 8px;
    }
    
    .countdown-timer-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .countdown-timer-page .tool-info,
    .countdown-timer-page .tool-instructions,
    .countdown-timer-page .tool-faqs {
        padding: 0 12px;
    }
    
    .countdown-timer-page .tool-instructions details,
    .countdown-timer-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .countdown-timer-page .tool-instructions summary,
    .countdown-timer-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .countdown-timer-page .tool-instructions ul,
    .countdown-timer-page .tool-instructions p,
    .countdown-timer-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .countdown-timer-page header h1,
    .countdown-timer-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .countdown-timer-page .subtitle {
        font-size: 12px;
    }
}

/* ================= STOPWATCH TOOL ================= */
.stopwatch-page .stopwatch-container {
    max-width: 600px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.stopwatch-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.stopwatch-page .stopwatch-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.stopwatch-page .stopwatch-display {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 30px;
    font-family: 'JetBrains Mono', monospace;
}

.stopwatch-page .time-block {
    text-align: center;
    background: linear-gradient(135deg, var(--bg-light), var(--card-bg));
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-width: 100px;
}

.stopwatch-page .time-block span:first-child {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stopwatch-page .time-block .label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stopwatch-page .ms-block {
    min-width: 80px;
}

.stopwatch-page .ms-block span:first-child {
    font-size: 2rem;
}

.stopwatch-page .colon {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stopwatch-page .ms-colon {
    font-size: 2rem;
}

.stopwatch-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.stopwatch-page .action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stopwatch-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.stopwatch-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.stopwatch-page .btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.stopwatch-page .btn-secondary:hover:not(:disabled) {
    background: var(--border-color);
}

.stopwatch-page .btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stopwatch-page .btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.stopwatch-page .btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.stopwatch-page .btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stopwatch-page .hidden {
    display: none;
}

.stopwatch-page .laps-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.stopwatch-page .laps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.stopwatch-page .laps-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.stopwatch-page .laps-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.stopwatch-page .laps-list {
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.stopwatch-page .lap-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stopwatch-page .lap-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.stopwatch-page .lap-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-main);
}

.stopwatch-page .laps-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.stopwatch-page .history-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stopwatch-page .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.stopwatch-page .history-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.stopwatch-page .history-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.stopwatch-page .clear-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.stopwatch-page .clear-btn:hover {
    background: var(--border-color);
}

.stopwatch-page .history-list {
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.stopwatch-page .history-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.stopwatch-page .history-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.stopwatch-page .history-time {
    font-size: 10px;
    color: var(--text-muted);
}

.stopwatch-page .history-actions {
    display: flex;
    gap: 8px;
}

.stopwatch-page .history-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition);
}

.stopwatch-page .history-delete:hover {
    background: #ef4444;
    color: white;
}

.stopwatch-page .history-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.stopwatch-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stopwatch-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.stopwatch-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.stopwatch-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.stopwatch-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.stopwatch-page header h1,
.stopwatch-page h1 {
    color: var(--primary) !important;
}

.stopwatch-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.stopwatch-page .tool-info,
.stopwatch-page .tool-instructions,
.stopwatch-page .tool-faqs {
    padding: 0 20px;
}

.stopwatch-page .tool-instructions details,
.stopwatch-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.stopwatch-page .tool-instructions summary,
.stopwatch-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.stopwatch-page .tool-instructions summary i,
.stopwatch-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .stopwatch-page .tool-instructions summary,
body.dark .stopwatch-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .stopwatch-page .tool-instructions summary i,
body.dark .stopwatch-page .tool-faqs summary i {
    color: #000000 !important;
}

.stopwatch-page .tool-instructions ul,
.stopwatch-page .tool-instructions p,
.stopwatch-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .stopwatch-page .stopwatch-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .stopwatch-page .workspace {
        padding: 10px;
    }
    
    .stopwatch-page .stopwatch-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .stopwatch-page .stopwatch-display {
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stopwatch-page .time-block {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .stopwatch-page .time-block span:first-child {
        font-size: 1.5rem;
    }
    
    .stopwatch-page .ms-block {
        min-width: 60px;
    }
    
    .stopwatch-page .ms-block span:first-child {
        font-size: 1.2rem;
    }
    
    .stopwatch-page .colon {
        font-size: 1.5rem;
    }
    
    .stopwatch-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .stopwatch-page .action-footer {
        gap: 8px;
        flex-direction: column;
    }
    
    .stopwatch-page .btn-primary,
    .stopwatch-page .btn-secondary,
    .stopwatch-page .btn-danger {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
    }
    
    .stopwatch-page .laps-header {
        padding: 8px 12px;
    }
    
    .stopwatch-page .laps-header h3 {
        font-size: 13px;
    }
    
    .stopwatch-page .laps-list {
        padding: 10px;
        max-height: 200px;
    }
    
    .stopwatch-page .lap-item {
        padding: 8px 12px;
    }
    
    .stopwatch-page .lap-number,
    .stopwatch-page .lap-time {
        font-size: 11px;
    }
    
    .stopwatch-page .history-header {
        padding: 8px 12px;
    }
    
    .stopwatch-page .history-header h3 {
        font-size: 13px;
    }
    
    .stopwatch-page .history-list {
        padding: 10px;
        max-height: 200px;
    }
    
    .stopwatch-page .history-item {
        padding: 10px;
    }
    
    .stopwatch-page .history-text {
        font-size: 11px;
    }
    
    .stopwatch-page .history-time {
        font-size: 9px;
    }
    
    .stopwatch-page .history-delete {
        padding: 2px 8px;
        font-size: 9px;
    }
    
    .stopwatch-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .stopwatch-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .stopwatch-page .tips-grid {
        gap: 8px;
    }
    
    .stopwatch-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .stopwatch-page .tool-info,
    .stopwatch-page .tool-instructions,
    .stopwatch-page .tool-faqs {
        padding: 0 12px;
    }
    
    .stopwatch-page .tool-instructions details,
    .stopwatch-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .stopwatch-page .tool-instructions summary,
    .stopwatch-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .stopwatch-page .tool-instructions ul,
    .stopwatch-page .tool-instructions p,
    .stopwatch-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .stopwatch-page header h1,
    .stopwatch-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .stopwatch-page .subtitle {
        font-size: 12px;
    }
}

/* ================= ALARM TOOL ================= */
.alarm-tool-page .alarm-tool-container {
    max-width: 550px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.alarm-tool-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.alarm-tool-page .current-time-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
    color: white;
}

.alarm-tool-page .current-time-card h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.alarm-tool-page .current-time-card h3 i {
    margin-right: 8px;
}

.alarm-tool-page .time-display {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 10px;
}

.alarm-tool-page .time-display .ampm {
    font-size: 1rem;
    font-weight: normal;
}

.alarm-tool-page .date-display {
    font-size: 0.85rem;
    opacity: 0.85;
}

.alarm-tool-page .alarm-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.alarm-tool-page .alarm-card h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.alarm-tool-page .alarm-card h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.alarm-tool-page .time-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.alarm-tool-page .input-group {
    text-align: center;
}

.alarm-tool-page .time-select {
    width: 80px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    background: var(--card-bg);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
}

.alarm-tool-page .time-select:focus {
    outline: none;
    border-color: var(--primary);
}

.alarm-tool-page .input-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 5px;
}

.alarm-tool-page .colon {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.alarm-tool-page .full-width {
    width: 100%;
}

.alarm-tool-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alarm-tool-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.alarm-tool-page .btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alarm-tool-page .btn-secondary:hover {
    background: var(--border-color);
}

.alarm-tool-page .alarms-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.alarm-tool-page .alarms-header {
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.alarm-tool-page .alarms-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.alarm-tool-page .alarms-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.alarm-tool-page .alarms-list {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.alarm-tool-page .alarm-item {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.alarm-tool-page .alarm-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.alarm-tool-page .alarm-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.alarm-tool-page .alarm-time i {
    font-size: 1rem;
}

.alarm-tool-page .alarm-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
}

.alarm-tool-page .alarm-status.active {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.alarm-tool-page .alarm-status.ringing {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    animation: pulse-ring 1s infinite;
}

.alarm-tool-page .alarm-status.snoozed {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

@keyframes pulse-ring {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.alarm-tool-page .alarm-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 5px 10px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.alarm-tool-page .alarm-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.alarm-tool-page .alarms-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.alarm-tool-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

/* Overlay for ringing alarm */
.alarm-tool-page .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alarm-tool-page .overlay.hidden {
    display: none;
}

.alarm-tool-page .ringing-modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.alarm-tool-page .bell-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    animation: ring 0.5s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.alarm-tool-page .ringing-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.alarm-tool-page .ringing-modal p {
    font-size: 1.2rem;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
    color: var(--text-main);
}

.alarm-tool-page .ringing-buttons {
    display: flex;
    gap: 10px;
}

.alarm-tool-page .ringing-buttons .btn-primary,
.alarm-tool-page .ringing-buttons .btn-secondary {
    flex: 1;
}

.alarm-tool-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.alarm-tool-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.alarm-tool-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.alarm-tool-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.alarm-tool-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.alarm-tool-page header h1,
.alarm-tool-page h1 {
    color: var(--primary) !important;
}

.alarm-tool-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.alarm-tool-page .tool-info,
.alarm-tool-page .tool-instructions,
.alarm-tool-page .tool-faqs {
    padding: 0 20px;
}

.alarm-tool-page .tool-instructions details,
.alarm-tool-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.alarm-tool-page .tool-instructions summary,
.alarm-tool-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.alarm-tool-page .tool-instructions summary i,
.alarm-tool-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .alarm-tool-page .tool-instructions summary,
body.dark .alarm-tool-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .alarm-tool-page .tool-instructions summary i,
body.dark .alarm-tool-page .tool-faqs summary i {
    color: #000000 !important;
}

.alarm-tool-page .tool-instructions ul,
.alarm-tool-page .tool-instructions p,
.alarm-tool-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .alarm-tool-page .alarm-tool-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .alarm-tool-page .workspace {
        padding: 10px;
    }
    
    .alarm-tool-page .current-time-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .alarm-tool-page .time-display {
        font-size: 1.5rem;
    }
    
    .alarm-tool-page .alarm-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .alarm-tool-page .time-inputs {
        gap: 8px;
    }
    
    .alarm-tool-page .time-select {
        width: 70px;
        padding: 8px;
        font-size: 0.9rem;
    }
    
    .alarm-tool-page .colon {
        font-size: 1.2rem;
    }
    
    .alarm-tool-page .btn-primary.full-width {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .alarm-tool-page .alarms-list {
        padding: 10px;
        max-height: 250px;
    }
    
    .alarm-tool-page .alarm-item {
        padding: 10px;
    }
    
    .alarm-tool-page .alarm-time {
        font-size: 0.9rem;
    }
    
    .alarm-tool-page .alarm-status {
        font-size: 9px;
    }
    
    .alarm-tool-page .ringing-modal {
        padding: 20px;
    }
    
    .alarm-tool-page .ringing-modal h2 {
        font-size: 1.2rem;
    }
    
    .alarm-tool-page .ringing-buttons {
        flex-direction: column;
    }
    
    .alarm-tool-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .alarm-tool-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .alarm-tool-page .tips-grid {
        gap: 8px;
    }
    
    .alarm-tool-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .alarm-tool-page .tool-info,
    .alarm-tool-page .tool-instructions,
    .alarm-tool-page .tool-faqs {
        padding: 0 12px;
    }
    
    .alarm-tool-page .tool-instructions details,
    .alarm-tool-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .alarm-tool-page .tool-instructions summary,
    .alarm-tool-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .alarm-tool-page .tool-instructions ul,
    .alarm-tool-page .tool-instructions p,
    .alarm-tool-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .alarm-tool-page header h1,
    .alarm-tool-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .alarm-tool-page .subtitle {
        font-size: 12px;
    }
}

/* ================= TIME ZONE CONVERTER ================= */
.timezone-page .timezone-container {
    max-width: 650px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.timezone-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.timezone-page .add-zone-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.timezone-page .input-group.full-width {
    width: 100%;
}

.timezone-page .input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.timezone-page .input-group label i {
    margin-right: 6px;
    color: var(--primary);
}

.timezone-page .select-with-button {
    display: flex;
    gap: 10px;
}

.timezone-page .zone-select {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
}

.timezone-page .zone-select:focus {
    outline: none;
    border-color: var(--primary);
}

.timezone-page .small-btn {
    padding: 12px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.timezone-page .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.timezone-page .btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.timezone-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.timezone-page .zones-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.timezone-page .zones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.timezone-page .zones-header h3 {
    font-size: 0.9rem;
    color: var(--text-main);
}

.timezone-page .zones-header h3 i {
    margin-right: 6px;
    color: var(--primary);
}

.timezone-page .clear-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted);
}

.timezone-page .clear-btn:hover {
    background: var(--border-color);
}

.timezone-page .zones-list {
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.timezone-page .zone-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.timezone-page .zone-card:hover {
    transform: translateX(3px);
}

.timezone-page .local-zone {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-color: var(--primary);
}

.timezone-page .local-zone .zone-info h4,
.timezone-page .local-zone .zone-info span,
.timezone-page .local-zone .zone-time {
    color: white;
}

.timezone-page .zone-info {
    margin-bottom: 10px;
}

.timezone-page .zone-info h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-main);
}

.timezone-page .zone-info h4 i {
    margin-right: 6px;
    color: var(--primary);
}

.timezone-page .local-zone .zone-info h4 i {
    color: white;
}

.timezone-page .zone-name {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
}

.timezone-page .zone-time-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.timezone-page .zone-time {
    flex: 1;
}

.timezone-page .time-main {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    display: inline-block;
    margin-right: 10px;
}

.timezone-page .local-zone .time-main {
    color: white;
}

.timezone-page .time-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 8px;
}

.timezone-page .local-zone .time-date {
    color: rgba(255, 255, 255, 0.8);
}

.timezone-page .time-offset {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 12px;
}

.timezone-page .local-zone .time-offset {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.timezone-page .zone-delete {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
}

.timezone-page .zone-delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.timezone-page .zones-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 13px;
}

.timezone-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.timezone-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.timezone-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.timezone-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.timezone-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.timezone-page header h1,
.timezone-page h1 {
    color: var(--primary) !important;
}

.timezone-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.timezone-page .tool-info,
.timezone-page .tool-instructions,
.timezone-page .tool-faqs {
    padding: 0 20px;
}

.timezone-page .tool-instructions details,
.timezone-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.timezone-page .tool-instructions summary,
.timezone-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.timezone-page .tool-instructions summary i,
.timezone-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .timezone-page .tool-instructions summary,
body.dark .timezone-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .timezone-page .tool-instructions summary i,
body.dark .timezone-page .tool-faqs summary i {
    color: #000000 !important;
}

.timezone-page .tool-instructions ul,
.timezone-page .tool-instructions p,
.timezone-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .timezone-page .timezone-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .timezone-page .workspace {
        padding: 10px;
    }
    
    .timezone-page .add-zone-card {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .timezone-page .select-with-button {
        flex-direction: column;
    }
    
    .timezone-page .small-btn {
        width: 100%;
        justify-content: center;
    }
    
    .timezone-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .timezone-page .zones-header {
        padding: 8px 12px;
    }
    
    .timezone-page .zones-header h3 {
        font-size: 13px;
    }
    
    .timezone-page .zones-list {
        padding: 10px;
        max-height: 400px;
    }
    
    .timezone-page .zone-card {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .timezone-page .time-main {
        font-size: 1rem;
    }
    
    .timezone-page .time-date,
    .timezone-page .time-offset {
        font-size: 9px;
    }
    
    .timezone-page .zone-delete {
        padding: 6px 10px;
    }
    
    .timezone-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .timezone-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .timezone-page .tips-grid {
        gap: 8px;
    }
    
    .timezone-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .timezone-page .tool-info,
    .timezone-page .tool-instructions,
    .timezone-page .tool-faqs {
        padding: 0 12px;
    }
    
    .timezone-page .tool-instructions details,
    .timezone-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .timezone-page .tool-instructions summary,
    .timezone-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .timezone-page .tool-instructions ul,
    .timezone-page .tool-instructions p,
    .timezone-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .timezone-page header h1,
    .timezone-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .timezone-page .subtitle {
        font-size: 12px;
    }
}
/* ================= CALENDAR GENERATOR ================= */
.calendar-page .calendar-container {
    max-width: 700px;
    margin: 30px auto 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-page .workspace {
    padding: 20px;
    background: var(--bg-light);
}

.calendar-page .calendar-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
}

.calendar-page .calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.calendar-page .icon-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.calendar-page .icon-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-page .date-selectors {
    display: flex;
    gap: 10px;
    flex: 1;
    justify-content: center;
}

.calendar-page .selector {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
}

.calendar-page .selector:focus {
    outline: none;
    border-color: var(--primary);
}

.calendar-page .year-input {
    width: 90px;
    text-align: center;
}

.calendar-page .calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 10px;
}

.calendar-page .day-name {
    text-align: center;
    padding: 12px 5px;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
}

.calendar-page .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-page .calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-light);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    border: 1px solid transparent;
}

.calendar-page .calendar-day span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.calendar-page .calendar-day:hover:not(.empty) {
    background: var(--border-color);
    transform: scale(0.98);
}

.calendar-page .calendar-day.empty {
    background: transparent;
    cursor: default;
    opacity: 0;
}

.calendar-page .calendar-day.today {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-page .calendar-day.today span {
    font-weight: 700;
}

.calendar-page .actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.calendar-page .btn-secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.calendar-page .btn-secondary:hover {
    background: var(--border-color);
}

.calendar-page .error-msg {
    color: #ef4444;
    font-size: 13px;
    margin: 10px 0;
    text-align: center;
    min-height: 30px;
}

.calendar-page .tips-section {
    margin: 20px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.calendar-page .tips-section h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.calendar-page .tips-section h3 i {
    margin-right: 8px;
    color: var(--primary);
}

.calendar-page .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.calendar-page .tip-item {
    padding: 8px 12px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Headers */
.calendar-page header h1,
.calendar-page h1 {
    color: var(--primary) !important;
}

.calendar-page .subtitle {
    color: var(--text-muted) !important;
}

/* Instructions */
.calendar-page .tool-info,
.calendar-page .tool-instructions,
.calendar-page .tool-faqs {
    padding: 0 20px;
}

.calendar-page .tool-instructions details,
.calendar-page .tool-faqs details {
    background: var(--bg-light);
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.calendar-page .tool-instructions summary,
.calendar-page .tool-faqs summary {
    font-weight: 600;
    color: #000000 !important;
    cursor: pointer;
    list-style: none;
}

.calendar-page .tool-instructions summary i,
.calendar-page .tool-faqs summary i {
    margin-right: 8px;
    color: #000000 !important;
}

body.dark .calendar-page .tool-instructions summary,
body.dark .calendar-page .tool-faqs summary {
    color: #000000 !important;
}

body.dark .calendar-page .tool-instructions summary i,
body.dark .calendar-page .tool-faqs summary i {
    color: #000000 !important;
}

.calendar-page .tool-instructions ul,
.calendar-page .tool-instructions p,
.calendar-page .tool-faqs p {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 800px) {
    .calendar-page .calendar-container {
        margin: 10px auto 0;
        border-radius: var(--radius-md);
    }
    
    .calendar-page .workspace {
        padding: 10px;
    }
    
    .calendar-page .calendar-card {
        padding: 12px;
    }
    
    .calendar-page .calendar-controls {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .calendar-page .icon-btn {
        width: 35px;
        height: 35px;
    }
    
    .calendar-page .date-selectors {
        gap: 6px;
    }
    
    .calendar-page .selector {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .calendar-page .year-input {
        width: 70px;
    }
    
    .calendar-page .day-name {
        padding: 8px 3px;
        font-size: 11px;
    }
    
    .calendar-page .calendar-grid {
        gap: 3px;
    }
    
    .calendar-page .calendar-day {
        font-size: 12px;
        border-radius: 8px;
    }
    
    .calendar-page .actions {
        margin-top: 15px;
    }
    
    .calendar-page .btn-secondary {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .calendar-page .error-msg {
        font-size: 11px;
        margin: 5px 0;
        min-height: auto;
    }
    
    .calendar-page .tips-section {
        margin: 12px;
        padding: 12px;
    }
    
    .calendar-page .tips-section h3 {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .calendar-page .tips-grid {
        gap: 8px;
    }
    
    .calendar-page .tip-item {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .calendar-page .tool-info,
    .calendar-page .tool-instructions,
    .calendar-page .tool-faqs {
        padding: 0 12px;
    }
    
    .calendar-page .tool-instructions details,
    .calendar-page .tool-faqs details {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    
    .calendar-page .tool-instructions summary,
    .calendar-page .tool-faqs summary {
        font-size: 13px;
    }
    
    .calendar-page .tool-instructions ul,
    .calendar-page .tool-instructions p,
    .calendar-page .tool-faqs p {
        margin-top: 6px;
        padding-left: 15px;
        font-size: 11px;
    }
    
    .calendar-page header h1,
    .calendar-page h1 {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }
    
    .calendar-page .subtitle {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .calendar-page .calendar-controls {
        flex-direction: column;
    }
    
    .calendar-page .date-selectors {
        order: 1;
    }
    
    .calendar-page .icon-btn:first-child {
        order: 0;
    }
    
    .calendar-page .icon-btn:last-child {
        order: 2;
    }
}