/* Custom styles for Japanese Text Converter */

/* Base styles */
body {
    min-height: 100vh;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #fff;
    width: 100%;
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Typography */
.app-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #6c757d;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* Cards styling */
.card {
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-header.bg-gradient {
    background: linear-gradient(90deg, rgba(13, 110, 253, 0.08) 0%, rgba(13, 202, 240, 0.08) 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.input-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.result-card {
    background-color: #f8f9fa;
}

/* Input and output areas */
.custom-textarea {
    border-radius: 0.5rem;
    border: 1px solid rgba(13, 110, 253, 0.3);
    background-color: #fff;
    color: #212529;
    font-size: 1.1rem;
    padding: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.custom-textarea:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.custom-btn-convert {
    background: linear-gradient(45deg, #0d6efd 30%, #0dcaf0 90%);
    border: none;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.custom-btn-convert:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.output-box {
    min-height: 100px;
    word-wrap: break-word;
    font-size: 1.1rem;
    background-color: #fff;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.section-title {
    color: #212529;
    border-left: 3px solid #0d6efd;
    padding-left: 0.75rem;
}

.result-section {
    padding: 0.5rem 0;
}

.placeholder-text {
    font-style: italic;
    opacity: 0.6;
}

.copy-btn {
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.3rem 0.8rem;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Footer styling */
.footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
    padding: 1rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    h1.display-4 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .custom-btn-convert {
        padding: 0.5rem 1.2rem;
    }
}

/* Animation for loading state */
.loading {
    opacity: 0.6;
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 4px solid rgba(13, 110, 253, 0.15);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Flash effect when copied */
.flash {
    animation: flash-animation 0.5s;
}

@keyframes flash-animation {
    0% { background-color: rgba(13, 110, 253, 0.05); }
    50% { background-color: rgba(13, 110, 253, 0.2); }
    100% { background-color: rgba(13, 110, 253, 0.05); }
}

/* キーワードバッジのスタイル */
.copy-keyword-icon {
    opacity: 0.6;
    font-size: 0.8rem;
    padding: 0.2rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.copy-keyword-icon:hover {
    opacity: 1;
    background-color: rgba(13, 110, 253, 0.1);
    transform: scale(1.1);
}

/* Pulse animation for button */
.btn-primary:focus {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
    }
}
