/* Japanese Name Generator Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Inter:wght@400;500;600;700&display=swap');

/* Container */
.jng-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #fff5f8 0%, #fdf2f8 50%, #fce7f3 100%);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(196, 69, 105, 0.15);
}

/* Header */
.jng-header {
    text-align: center;
    margin-bottom: 40px;
}

.jng-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    animation: jng-float 3s ease-in-out infinite;
}

.jng-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.4));
}

@keyframes jng-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.jng-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #C44569 0%, #FF6B9D 50%, #FF8E72 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.jng-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

/* Controls */
.jng-controls {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Gender Selector */
.jng-gender-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.jng-gender-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.jng-gender-btn:hover {
    border-color: #FF6B9D;
    color: #C44569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
}

.jng-gender-btn.active {
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.jng-gender-icon {
    font-size: 1.2rem;
}

/* Options */
.jng-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.jng-option-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jng-option-group label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.jng-select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    font-size: 0.95rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-width: 180px;
}

.jng-select:hover {
    border-color: #FF6B9D;
}

.jng-select:focus {
    outline: none;
    border-color: #FF6B9D;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

/* Generate Button */
.jng-generate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 18px 40px;
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.jng-generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.5);
}

.jng-generate-btn:active {
    transform: translateY(-1px);
}

.jng-btn-icon {
    font-size: 1.3rem;
    animation: jng-shake 0.5s ease-in-out;
}

.jng-generate-btn:hover .jng-btn-icon {
    animation: jng-shake 0.5s ease-in-out;
}

@keyframes jng-shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* Results */
.jng-results {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    min-height: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.jng-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #94a3b8;
}

.jng-placeholder-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    color: #FF6B9D;
}

.jng-placeholder p {
    margin: 0;
    font-size: 1rem;
}

/* Name Cards */
.jng-names-grid {
    display: grid;
    gap: 20px;
}

.jng-name-card {
    background: linear-gradient(135deg, #fdf2f8 0%, #fff 100%);
    border: 1px solid #fce7f3;
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
    animation: jng-fadeIn 0.5s ease forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.jng-name-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FF6B9D 0%, #C44569 100%);
    border-radius: 4px 0 0 4px;
}

.jng-name-card:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.15);
}

@keyframes jng-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jng-name-card:nth-child(1) { animation-delay: 0.1s; }
.jng-name-card:nth-child(2) { animation-delay: 0.2s; }
.jng-name-card:nth-child(3) { animation-delay: 0.3s; }
.jng-name-card:nth-child(4) { animation-delay: 0.4s; }
.jng-name-card:nth-child(5) { animation-delay: 0.5s; }
.jng-name-card:nth-child(6) { animation-delay: 0.6s; }
.jng-name-card:nth-child(7) { animation-delay: 0.7s; }
.jng-name-card:nth-child(8) { animation-delay: 0.8s; }
.jng-name-card:nth-child(9) { animation-delay: 0.9s; }
.jng-name-card:nth-child(10) { animation-delay: 1.0s; }

.jng-name-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.jng-name-kanji {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.2;
}

.jng-name-romaji {
    font-size: 1.3rem;
    color: #C44569;
    font-weight: 600;
}

.jng-name-gender {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jng-name-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #fce7f3;
}

.jng-detail-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jng-detail-label {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jng-detail-value {
    font-size: 0.95rem;
    color: #475569;
}

.jng-copy-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #64748b;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
}

.jng-copy-btn:hover {
    background: #fdf2f8;
    border-color: #FF6B9D;
    color: #C44569;
}

.jng-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Info Section */
.jng-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.jng-info-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.jng-info-card h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.jng-info-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.jng-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jng-info-card li {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.jng-info-card li:last-child {
    border-bottom: none;
}

.jng-info-card strong {
    color: #C44569;
}

/* Responsive */
@media (max-width: 768px) {
    .jng-container {
        padding: 25px 15px;
        border-radius: 16px;
    }

    .jng-title {
        font-size: 1.8rem;
    }

    .jng-subtitle {
        font-size: 0.95rem;
    }

    .jng-controls {
        padding: 20px;
    }

    .jng-gender-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .jng-options {
        flex-direction: column;
        align-items: stretch;
    }

    .jng-select {
        width: 100%;
    }

    .jng-name-card {
        padding: 20px;
    }

    .jng-name-kanji {
        font-size: 1.6rem;
    }

    .jng-name-romaji {
        font-size: 1.1rem;
    }

    .jng-name-header {
        flex-direction: column;
    }

    .jng-copy-btn {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
    }

    .jng-info {
        grid-template-columns: 1fr;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .jng-container {
        background: linear-gradient(135deg, #1e1b2e 0%, #2d2640 50%, #3d2d4a 100%);
    }

    .jng-controls,
    .jng-results,
    .jng-info-card {
        background: #2d2640;
    }

    .jng-subtitle,
    .jng-option-group label,
    .jng-info-card p,
    .jng-info-card li,
    .jng-detail-value {
        color: #a1a1aa;
    }

    .jng-title {
        background: linear-gradient(135deg, #FF6B9D 0%, #FF8E72 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .jng-gender-btn {
        background: #3d2d4a;
        border-color: #4a3d5a;
        color: #e4e4e7;
    }

    .jng-gender-btn:hover {
        border-color: #FF6B9D;
        color: #FF6B9D;
    }

    .jng-select {
        background: #3d2d4a;
        border-color: #4a3d5a;
        color: #e4e4e7;
    }

    .jng-name-card {
        background: linear-gradient(135deg, #3d2d4a 0%, #2d2640 100%);
        border-color: #4a3d5a;
    }

    .jng-name-kanji,
    .jng-info-card h3 {
        color: #f4f4f5;
    }

    .jng-name-details {
        border-top-color: #4a3d5a;
    }

    .jng-copy-btn {
        background: #3d2d4a;
        border-color: #4a3d5a;
        color: #a1a1aa;
    }

    .jng-copy-btn:hover {
        background: #4a3d5a;
    }

    .jng-info-card li {
        border-bottom-color: #4a3d5a;
    }

    .jng-placeholder {
        color: #71717a;
    }
}

/* Loading animation */
.jng-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.jng-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #fce7f3;
    border-top-color: #FF6B9D;
    border-radius: 50%;
    animation: jng-spin 1s linear infinite;
}

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

/* Toast notification */
.jng-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 9999;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.jng-toast.show {
    transform: translateX(-50%) translateY(0);
}
