/* tools.css */
.currency-converter {
    max-width: 800px;
    margin: 0 auto;
}

.currency-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.currency-input {
    flex: 1;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.currency-select {
    width: 150px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.exchange-rate-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.currency-chart {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.currency-chart canvas {
    width: 100%;
    height: 300px;
}

.favorite-rates {
    margin-top: 2rem;
}

.favorite-rate-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* tools.css에 추가 */
.connection-status {
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    text-align: center;
}

.connection-status.online {
    background-color: #d1fae5;
    color: #065f46;
}

.connection-status.offline {
    background-color: #fee2e2;
    color: #991b1b;
}

.last-update {
    text-align: right;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.refresh-button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.refresh-button:hover {
    background-color: #2563eb;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem;
    border-radius: 4px;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #d1fae5;
    color: #065f46;
}

.notification.error {
    background-color: #fee2e2;
    color: #991b1b;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.tool-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tool-card h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
}

.converter-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .converter-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.input-group {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.input-group input {
    flex: 1;
    min-width: 0;
}

.input-group select {
    width: auto;
    min-width: 120px;
}

.arrow {
    font-size: 1.5rem;
    color: #666;
    padding: 0 1rem;
}

.unit-type-selector {
    margin-bottom: 1.5rem;
}

/* 진법 변환기 스타일 */
.number-converter {
    max-width: 600px;
    margin: 0 auto;
}

.converter-input-group {
    margin-bottom: 1rem;
}

.converter-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.input-with-copy {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-with-copy input {
    flex: 1;
}

.copy-btn {
    padding: 0.5rem;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.copy-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* BMI 계산기 스타일 */
.bmi-calculator {
    max-width: 500px;
    margin: 0 auto;
}

.input-section {
    margin-bottom: 2rem;
}

.result-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.bmi-scale {
    margin-top: 2rem;
}

.scale-bar {
    height: 8px;
    background: linear-gradient(
        to right,
        #93c5fd 0%,    /* 저체중 - 연한 파랑 */
        #22c55e 20%,   /* 정상 - 초록 */
        #fbbf24 40%,   /* 과체중 - 노랑 */
        #f87171 60%,   /* 비만 - 빨강 */
        #dc2626 80%    /* 고도비만 - 진한 빨강 */
    );
    border-radius: 4px;
    position: relative;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

#bmiIndicator {
    width: 4px;
    height: 16px;
    background-color: #1e40af;
    border-radius: 2px;
    position: absolute;
    top: -4px;
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

/* 세계시계 */

/* 세계시계 스타일 */
.world-clock-container {
    max-width: 800px;
    margin: 0 auto;
}

.current-time {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.city-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.city-item:hover {
    transform: translateY(-2px);
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #fbbf24;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

.search-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (min-width: 640px) {
    #allCities, #favoriteCities {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    #allCities, #favoriteCities {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 날짜계산기 */
/* 날짜 계산기 스타일 */
.date-calculator {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result-box {
    background-color: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.saved-ddays {
    margin-top: 1rem;
}

.saved-dday-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.saved-dday-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.delete-dday {
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-dday:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

.calculator-type select,
.input-group input[type="date"],
.input-group input[type="text"],
.input-group input[type="number"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 1rem;
}

.calculator-type select:focus,
.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

@media (max-width: 640px) {
    .date-calculator {
        padding: 1rem;
    }
    
    .calculator-section {
        padding: 1rem;
    }
}

/* 타이머 */
/* tools.css에 추가할 타이머 스타일 */
/* 타이머 스타일 */
.timer-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

.timer-circle-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto 2rem;
}

@media (max-width: 480px) {
    .timer-circle-container {
        width: 200px;
        height: 200px;
    }
}

.timer-circle {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-circle-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 4;
}

.timer-circle-progress {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.3s ease;
}

.timer-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: #1f2937;
}

@media (max-width: 480px) {
    .timer-value {
        font-size: 1.8rem;
    }
}

.timer-controls-container {
    text-align: center;
    margin-bottom: 2rem;
}

.timer-input-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.timer-input-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-input-field input {
    width: 70px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1.2rem;
}

.timer-input-field label {
    margin-top: 0.5rem;
    color: #6b7280;
}

.timer-alarm-select {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.alarm-select {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
}

.test-alarm-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.test-alarm-btn:hover {
    background-color: #f3f4f6;
}

.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timer-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.timer-btn.start {
    background-color: #3b82f6;
    color: white;
}

.timer-btn.start:hover {
    background-color: #2563eb;
}

.timer-btn.pause {
    background-color: #f59e0b;
    color: white;
}

.timer-btn.pause:hover {
    background-color: #d97706;
}

.timer-btn.reset {
    background-color: #ef4444;
    color: white;
}

.timer-btn.reset:hover {
    background-color: #dc2626;
}

.timer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.timer-presets {
    text-align: center;
}

.timer-presets h3 {
    margin-bottom: 1rem;
    color: #374151;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 480px) {
    .preset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.preset-btn {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* 타이머 완료 모달 */
.timer-complete-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;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    max-width: 90%;
    width: 400px;
}

.modal-content h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.confirm-btn {
    padding: 0.75rem 2rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.confirm-btn:hover {
    background-color: #2563eb;
}

/* Calculator styles */
.calculator-container {
    max-width: 320px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calculator-display {
    background: #ffffff;
    padding: 1rem;
    text-align: right;
}

.equation-display {
    min-height: 1.2em;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.result-display {
    font-size: 2rem;
    font-weight: bold;
    color: #212529;
    min-height: 2.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #dee2e6;
    padding: 1px;
}

.calc-btn {
    border: none;
    background: #ffffff;
    padding: 1rem 0;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.calc-btn:hover {
    background: #e9ecef;
}

.calc-btn-operator {
    background: #e7f5ff;
    color: #1971c2;
}

.calc-btn-operator:hover {
    background: #d0ebff;
}

.calc-btn-equals {
    background: #51cf66;
    color: white;
}

.calc-btn-equals:hover {
    background: #40c057;
}

.calc-btn-clear {
    background: #ffe3e3;
    color: #e03131;
}

.calc-btn-clear:hover {
    background: #ffc9c9;
}

.calc-btn-backspace {
    background: #fff4e6;
    color: #f76707;
}

.calc-btn-backspace:hover {
    background: #ffe8cc;
}

.calc-btn-zero {
    grid-column: span 2;
}

/* Notepad styles */
.notepad-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 70vh;
}

.notepad-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 0.5rem 0 0.5rem;
    overflow-x: auto;
}

.tab-list {
    display: flex;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.note-tab {
    background: #e9ecef;
    border-radius: 4px 4px 0 0;
    padding: 0.5rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-tab.active {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-bottom: none;
    margin-bottom: -1px;
}

.new-tab-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    color: #495057;
}

.new-tab-btn:hover {
    color: #228be6;
}

.notepad-toolbar {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

.note-title {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
}

.toolbar-buttons {
    display: flex;
    gap: 0.5rem;
}

.toolbar-buttons button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 4px;
}

.save-btn:hover {
    background: #e3fafc;
}

.delete-btn:hover {
    background: #fff5f5;
}

.note-content {
    flex: 1;
    padding: 1rem;
    border: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
    outline: none;
}

.notepad-status {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    color: #868e96;
    font-size: 0.875rem;
}

/* tools.css에 추가할 Character Counter 스타일 */
.counter-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

.counter-options {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.text-input {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    resize: vertical;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.count-results {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.total-count {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.total-count span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.detailed-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.count-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.count-item span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #4b5563;
    margin-bottom: 0.5rem;
}

.count-item label {
    font-size: 0.875rem;
    color: #6b7280;
}

.additional-info {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.info-item {
    color: #4b5563;
    font-size: 0.875rem;
}

/* tools.css에 추가할 Lotto Generator 스타일 */
.lotto-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

.generation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.options-group label {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
}

.game-count {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    min-width: 120px;
}

.exclude-numbers {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 150px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

.generate-btn, .reset-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.generate-btn {
    background-color: #3b82f6;
    color: white;
}

.generate-btn:hover {
    background-color: #2563eb;
}

.reset-btn {
    background-color: #ef4444;
    color: white;
}

.reset-btn:hover {
    background-color: #dc2626;
}

.generated-numbers {
    min-height: 200px;
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.placeholder-text {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
}

.number-set {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.game-label {
    min-width: 80px;
    font-weight: 500;
    color: #374151;
}

.number-balls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.number-ball {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    color: white;
}

.color-yellow { background-color: #fbbf24; }
.color-blue { background-color: #3b82f6; }
.color-red { background-color: #ef4444; }
.color-gray { background-color: #6b7280; }
.color-green { background-color: #10b981; }

.number-stats h3, .recent-numbers h3 {
    color: #374151;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.number-stat {
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: #f3f4f6;
    transition: all 0.2s;
}

.number-stat.has-count {
    background-color: #dbeafe;
}

.stat-number {
    font-weight: 500;
    color: #374151;
}

.stat-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recent-set {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
}

.recent-label {
    min-width: 80px;
    font-weight: 500;
    color: #374151;
}

@media (max-width: 640px) {
    .generation-options {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-group {
        flex-direction: column;
    }

    .game-count, .exclude-numbers {
        width: 100%;
    }
}

/* tools.css에 추가할 Mini Game 스타일 */
.minigame-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

.game-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.game-btn {
    flex: 1;
    padding: 0.75rem;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.game-btn:hover {
    background: #e5e7eb;
}

.game-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #2563eb;
}

.game-section {
    text-align: center;
}

.game-area {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* 가위바위보 스타일 */
.player-choice, .computer-choice {
    text-align: center;
}

.choice-label {
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 500;
}

.choice-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.rps-btn {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.rps-btn:hover {
    transform: scale(1.1);
    background: #f3f4f6;
}

.vs-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6b7280;
    margin: 1rem 0;
}

.computer-display {
    width: 80px;
    height: 80px;
    font-size: 2.5rem;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* 동전던지기 스타일 */
.coin {
    width: 100px;
    height: 100px;
    position: relative;
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 1.5s ease-out;
}

.coin-front, .coin-back {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    backface-visibility: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.coin-front {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    color: #92400e;
}

.coin-back {
    background: linear-gradient(45deg, #d97706, #b45309);
    color: #fbbf24;
    transform: rotateY(180deg);
}

.flip-heads {
    animation: flipHeads 1.5s ease-out forwards;
}

.flip-tails {
    animation: flipTails 1.5s ease-out forwards;
}

@keyframes flipHeads {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(1440deg); }
}

@keyframes flipTails {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(1620deg); }
}

.flip-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.flip-btn:hover {
    background: #2563eb;
}

.flip-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.game-result {
    font-size: 1.5rem;
    font-weight: bold;
    color: #374151;
    min-height: 2rem;
    margin: 1rem 0;
}

.stats-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-item {
    color: #4b5563;
    font-size: 0.875rem;
}

.stat-item span {
    font-weight: bold;
    color: #2563eb;
}

.game-controls {
    margin-top: 2rem;
    text-align: center;
}

.reset-btn {
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reset-btn:hover {
    background: #dc2626;
}

@media (max-width: 640px) {
    .game-selector {
        flex-direction: column;
    }

    .choice-buttons {
        flex-wrap: wrap;
    }

    .stats-display {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
}
/* tools.css에 추가할 Ladder Game 스타일 */
.ladder-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

.ladder-settings {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .ladder-settings {
        flex-direction: column;
        gap: 1rem;
    }
}

.participants-section,
.results-section {
    flex: 1;
}

.ladder-settings h3 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.input-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.input-row {
    display: flex;
    gap: 0.5rem;
}

.input-row input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
}

.input-row input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.delete-btn {
    padding: 0.5rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #fecaca;
}

.delete-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.add-btn {
    width: 100%;
    padding: 0.5rem;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #e5e7eb;
}

.ladder-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.generate-btn,
.reset-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.generate-btn {
    background: #3b82f6;
    color: white;
}

.generate-btn:hover {
    background: #2563eb;
}

.reset-btn {
    background: #ef4444;
    color: white;
}

.reset-btn:hover {
    background: #dc2626;
}

.ladder-game {
    width: 100%;
    overflow-x: auto;
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
}

#ladderCanvas {
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.button-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .ladder-controls {
        flex-direction: column;
    }

    .button-row {
        flex-direction: column;
    }
}

/* tools.css에 추가할 Pinball Sorter 스타일 */
.pinball-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
}

.pinball-settings {
    margin-bottom: 2rem;
}

.participants-section h3 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.participant-count {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: normal;
}

.input-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.input-list::-webkit-scrollbar {
    width: 8px;
}

.input-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.input-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.input-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: white;
    padding: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.color-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-row input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.875rem;
}

.input-row input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.delete-btn {
    padding: 0.5rem;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: #fecaca;
}

.delete-btn:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.add-btn {
    width: 100%;
    padding: 0.75rem;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.pinball-game {
    margin-bottom: 2rem;
}

.game-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.start-btn,
.reset-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.start-btn {
    background: #3b82f6;
    color: white;
    flex: 1;
}

.start-btn:hover {
    background: #2563eb;
}

.start-btn:disabled {
    background: #93c5fd;
    cursor: not-allowed;
}

.reset-btn {
    background: #ef4444;
    color: white;
}

.reset-btn:hover {
    background: #dc2626;
}

.game-area {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#pinballCanvas {
    width: 100%;
    height: 100%;
}

.result-display {
    margin-top: 2rem;
}

.result-display h3 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.result-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.result-list::-webkit-scrollbar {
    width: 8px;
}

.result-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.result-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.result-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.result-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.result-rank {
    font-weight: bold;
    color: #3b82f6;
    min-width: 3rem;
}

.result-name {
    color: #374151;
    flex: 1;
}

@media (max-width: 640px) {
    .game-controls {
        flex-direction: column;
    }

    .game-area {
        height: 100%;
    }

    .input-list,
    .result-list {
        grid-template-columns: 1fr;
    }
}

/* 도구별 스타일 */

/* 계산기 */
.calculator {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    max-width: 320px;
    margin: 0 auto;
}

.dark .calculator {
    background: var(--dark-glass-bg);
}

.calculator-display {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
    color: white;
    padding: 1.5rem;
    text-align: right;
    font-size: 2rem;
    font-weight: 300;
}

.calculator-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: var(--neutral-200);
}

.dark .calculator-keys {
    background-color: var(--neutral-700);
}

.calculator-key {
    background-color: white;
    border: none;
    padding: 1rem;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.dark .calculator-key {
    background-color: var(--neutral-800);
    color: var(--neutral-200);
}

.calculator-key:hover {
    background-color: var(--neutral-100);
}

.calculator-key.operator {
    background-color: var(--primary-100);
    color: var(--primary-700);
}

.dark .calculator-key.operator {
    background-color: rgba(124, 58, 237, 0.2);
    color: var(--primary-300);
}

.calculator-key.equals {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    grid-column: span 2;
}

.calculator-key.equals:hover {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
}

/* QR 코드 생성기 */
.qr-generator {
    max-width: 480px;
    margin: 0 auto;
}

.qr-preview {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.dark .qr-preview {
    background-color: var(--neutral-800);
    border: 1px solid var(--dark-glass-border);
}

/* 포모도로 타이머 */
.pomodoro-timer {
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.timer-display {
    font-size: 5rem;
    font-weight: 300;
    color: var(--primary-700);
    margin: 2rem 0;
}

.dark .timer-display {
    color: var(--primary-300);
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.timer-button {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    border: none;
    border-radius: 9999px;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.timer-button:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.timer-progress {
    width: 100%;
    height: 0.5rem;
    background-color: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
    margin: 2rem 0;
}

.dark .timer-progress {
    background-color: var(--neutral-700);
}

.timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500) 0%, var(--primary-600) 100%);
    transition: width 1s linear;
}

/* 비밀번호 생성기 */
.password-generator {
    max-width: 480px;
    margin: 0 auto;
}

.password-display {
    position: relative;
    margin-bottom: 1.5rem;
}

.password-field {
    width: 100%;
    padding: 1rem;
    font-family: monospace;
    font-size: 1.25rem;
    background-color: white;
    border: 1px solid var(--neutral-300);
    border-radius: 0.5rem;
}

.dark .password-field {
    background-color: var(--neutral-800);
    border-color: var(--neutral-700);
    color: var(--neutral-200);
}

.copy-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-600);
    cursor: pointer;
    padding: 0.5rem;
}

.dark .copy-button {
    color: var(--primary-400);
}

.password-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.option-label {
    font-size: 0.875rem;
    color: var(--neutral-700);
}

.dark .option-label {
    color: var(--neutral-300);
}

.strength-meter {
    height: 0.5rem;
    background-color: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.dark .strength-meter {
    background-color: var(--neutral-700);
}

.strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-bar.weak {
    background-color: var(--error);
}

.strength-bar.medium {
    background-color: var(--warning);
}

.strength-bar.strong {
    background-color: var(--success);
}

/* 메모리 게임 */
.memory-game {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-card-front {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    font-size: 1.5rem;
}

.memory-card-back {
    background-color: white;
    transform: rotateY(180deg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .memory-card-back {
    background-color: var(--neutral-800);
    border: 1px solid var(--dark-glass-border);
}

/* 할 일 목록 */
.todo-list {
    max-width: 480px;
    margin: 0 auto;
}

.todo-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.todo-input {
    flex: 1;
}

.todo-items {
    display: grid;
    gap: 0.5rem;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.dark .todo-item {
    background-color: var(--neutral-800);
    border: 1px solid var(--dark-glass-border);
}

.todo-item.completed {
    opacity: 0.7;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: var(--neutral-500);
}

.todo-checkbox {
    margin-right: 0.75rem;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--neutral-300);
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
}

.dark .todo-checkbox {
    border-color: var(--neutral-600);
}

.todo-checkbox:checked {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.todo-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 0.3rem;
    top: 0.1rem;
    width: 0.4rem;
    height: 0.7rem;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.todo-text {
    flex: 1;
}

.todo-delete {
    background: none;
    border: none;
    color: var(--neutral-500);
    cursor: pointer;
    padding: 0.25rem;
}

.todo-delete:hover {
    color: var(--error);
}