/* style.css */

/* 1. 전체 기본 설정 (Dark Theme) */
body {
    background-color: #282c34;
    color: #eee;
    font-family: 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    box-sizing: border-box;
}

.container {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 2. 아이콘 & 애니메이션 */
.icon-container {
    margin-top: 20px;
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    
    animation: rotate-slow 20s linear infinite;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#main-icon:active {
    transform: scale(0.95);
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.super-fast {
    animation: rotate-slow 0.2s linear infinite !important;
}

/* 이스터에그 메시지 */
#easter-egg-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.3s;
}

.hidden {
    display: none !important;
}

/* 3. 텍스트 표시 영역 */
.display-area {
    width: 100%;
    min-height: 150px;
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    padding: 20px;
    background-color: #333;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    box-sizing: border-box;
    text-align: center;
}

#ability-text {
    font-size: 1.1rem;
    font-style: italic;
    font-weight: bold;
    word-break: keep-all;
    line-height: 1.5;
    color: #fff;
    margin: 0 0 10px 0;
}

#ability-meta {
    font-size: 0.9rem;
    color: #aaa;
    margin: 0;
}

/* 4. 컨트롤 영역 */
.control-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin-top: 10px;
    align-items: center;
}

/* 필터 드롭다운 */
.filter-wrapper {
    display: flex;
    gap: 10px;
    width: 100%;
}

select {
    flex: 1;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #444;
    color: #fff;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
}

/* 생성 버튼 */
#generate-btn {
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('button-bg.png'); 
    background-color: #17006b; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    border: none;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    -webkit-tap-highlight-color: transparent;
}

#generate-btn:hover {
    filter: brightness(1.1);
}

#generate-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 5. 하단 링크 버튼들 */
.footer-links {
    display: grid;               /* Flex 대신 Grid 사용 */
    grid-template-columns: repeat(2, 90px); /* 90px 너비의 기둥 2개 생성 */
    justify-content: center;     /* 전체 그리드를 중앙 정렬 */
    gap: 15px;                   /* 버튼 사이 간격 (조금 넉넉하게) */
    margin-top: 30px;
    width: 100%;
}

/* [수정됨] 하단 버튼 3개 크기 통일 */
.link-btn {
    text-decoration: none;
    color: #ccc;
    border: 1px solid #555;
    
    /* 고정 크기 (정사각형) */
    width: 90px;
    height: 90px;
    
    /* 내용 중앙 정렬 */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    border-radius: 15px; /* 둥근 사각형 */
    font-size: 0.8rem;
    line-height: 1.3;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.05); /* 아주 연한 배경 */
    
    /* [추가] 모바일 터치 하이라이트 제거 */
    -webkit-tap-highlight-color: transparent;
}

.emoji-btn {
    font-size: 0.8rem; 
}

.link-btn:hover {
    background-color: #444;
    color: #fff;
    border-color: #fff;
    transform: translateY(-3px); /* 마우스 올리면 살짝 떠오름 */
}

/* 6. 푸터 */
footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
    line-height: 1.6;
}

.footer-link-text {
    color: #999;
    text-decoration: none;
}

.footer-link-text:hover {
    text-decoration: underline;
    color: #bbb;
}

/* ========================================= */
/* 7. 상세 운영법 보기 및 복사 버튼 스타일 */
/* ========================================= */

#details-toggle-btn {
    background: none;
    border: 1px solid #666;
    color: #aaa;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
}

#details-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #999;
}

#details-container {
    width: 100%;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #444;
    text-align: left;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 복사 버튼 래퍼 */
.copy-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #555;
}

/* [수정] 버튼 크기 30%로 축소 */
#copy-btn {
    background-color: #34495e;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 12px; /* 패딩도 살짝 줄임 */
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    
    /* 너비 조정 */
    width: 30%; 
    min-width: 120px; /* 너무 작아지지 않게 안전장치 */
}

#copy-btn:hover {
    background-color: #2c3e50;
    border-color: #888;
}

#copy-btn:active {
    transform: translateY(2px);
}

.detail-item {
    margin-bottom: 15px;
}

.detail-label {
    display: block;
    font-weight: bold;
    color: #ffd700;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.detail-content {
    font-size: 0.9rem;
    color: #ddd;
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}