.menu-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 20px;
}

.menu-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #adb5bd;
}

.menu-card .icon {
    font-size: 2em;
    color: #1971c2;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e7f5ff;
    border-radius: 10px;
}

.menu-card .text {
    flex: 1;
}

.menu-card h3 {
    margin: 0 0 8px 0;
    color: #1971c2;
    font-size: 1.1em;
}

.menu-card p {
    margin: 0;
    color: #666;
    font-size: 0.85em;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .menu-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .menu-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .menu-cards {
        grid-template-columns: 1fr;
    }
}

.base64-encoder-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    padding: 20px;
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: bold;
    color: #495057;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
}

.buttons {
    display: flex;
    gap: 10px;
}

.action-button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.encode-button {
    background-color: #1971c2;
    color: white;
}

.encode-button:hover {
    background-color: #1864ab;
}

.decode-button {
    background-color: #e9ecef;
    color: #495057;
}

.decode-button:hover {
    background-color: #dee2e6;
}

.result-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.result-title {
    font-size: 1.1em;
    color: #495057;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-box {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-box:last-child {
    margin-bottom: 0;
}

.part-header {
    font-size: 0.9em;
    color: #1971c2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.part-content {
    font-family: monospace;
    font-size: 0.9em;
    color: #495057;
    white-space: pre-wrap;
    word-break: break-all;
}

.error-message {
    color: #e03131;
    font-size: 0.9em;
    margin-top: 10px;
}

.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 220px;
}

.floating-action-btn {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
}

.floating-action-btn span {
    flex: 1;
    text-align: left;
}

.floating-action-btn i {
    width: 16px;
    flex-shrink: 0;
    font-size: 16px;
    text-align: center;
}

.floating-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.floating-action-btn:active {
    transform: translateY(0);
}

.api-home-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.ebook-home-button {
    background: linear-gradient(135deg, #1971c2 0%, #4dabf7 100%);
}

.game-home-button {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.simulation-home-button {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
}

.share-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

@media (max-width: 768px) {
    .floating-actions {
        right: 15px;
        bottom: 15px;
        width: 200px;
        gap: 10px;
    }

    .floating-action-btn {
        min-height: 40px;
        padding: 10px 14px;
        font-size: 13px;
    }
}
