/* 기본 스타일 */
body, .container {
    background-color: #f4f6f8;
    color: #333;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    padding: 20px;
}

.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 1rem;
}

h5, .text-muted {
    color: #555555;
    transition: color 0.3s;
}

.row {
    display: flex;
    gap: 20px;
}

.col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea {
    font-size: 1.1rem;
    padding: 12px;
    resize: none;
    height: 250px;
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* 카드 스타일 */
.result-card {
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    min-width: 200px;
    max-width: 250px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.3s, color 0.3s;
    background-color: #f4f6f8;
}

.result-card:hover {
    transform: scale(1.05);
}

.result-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.new-code {
    background-color: #fde2e2;
    border: 2px solid #e74c3c;
    color: #c0392b;
}

.existing-code {
    background-color: #e2f7e2;
    border: 2px solid #27ae60;
    color: #2d8659;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.copy-btn, .btn {
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: none;
}

.copy-btn {
    background-color: #3498db;
    color: #ffffff;
}

.copy-btn:hover {
    background-color: #2980b9;
}

.text-muted {
    font-size: 0.9em;
    color: #555555;
    transition: color 0.3s;
}

#buttonRow {
    display: flex;
    gap: 10px;
}

.btn {
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

/* 다크 모드 스타일 */
body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

.dark-mode .container {
    background-color: #1e1e1e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dark-mode h1, .dark-mode h5, .dark-mode .text-muted, .dark-mode #infoText {
    color: #f5f5f5;
}

.dark-mode .result-card {
    background-color: #1e1e1e;
    color: #ffffff;
}

.dark-mode .new-code {
    background-color: #8b0000;
    border: 2px solid #ff6f61;
    color: #ffdddd;
}

.dark-mode .existing-code {
    background-color: #2d572c;
    border: 2px solid #66bb6a;
    color: #dff2e0;
}

.dark-mode .btn-secondary {
    color: #f5f5f5;
    background-color: #666;
}

.dark-mode textarea {
    background-color: #1e1e1e;
    color: #f5f5f5;
    border: 1px solid #555;
}

#darkModeToggle {
    position: fixed;
    top: 15px;
    right: 15px;
    padding: 10px 15px;
    background-color: #4fc3f7;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

#darkModeToggle:hover {
    background-color: #0288d1;
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .result-card {
        max-width: 100%;
    }

    #buttonRow {
        flex-direction: column;
        gap: 10px;
    }
}
