/* ============================================
   ThisGun Community - Common Styles
   ============================================ */

/* Reset & base */
.tgc-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans KR', sans-serif;
    line-height: 1.7;
    color: #333;
}
.tgc-wrap * { box-sizing: border-box; }

.tgc-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}
.tgc-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

/* Forms */
.tgc-form-group {
    margin-bottom: 18px;
}
.tgc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}
.tgc-input, .tgc-select, .tgc-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #fff;
    font-family: inherit;
}
.tgc-input:focus, .tgc-select:focus, .tgc-textarea:focus {
    outline: none;
    border-color: #7c4dff;
}
.tgc-textarea { resize: vertical; min-height: 100px; }

/* Radio group */
.tgc-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tgc-radio-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.tgc-radio-label:hover {
    border-color: #aaa;
}
.tgc-radio-label input { display: none; }
.tgc-radio-label.active {
    border-color: #7c4dff;
    background: #f3edff;
    color: #7c4dff;
    font-weight: 600;
}

/* Buttons */
.tgc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.tgc-btn:active { transform: scale(0.97); }
.tgc-btn-full { width: 100%; }

/* Cards */
.tgc-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.tgc-card:hover { transform: translateY(-2px); }

/* Fade in animation */
@keyframes tgcFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.tgc-fade-in {
    animation: tgcFadeIn 0.4s ease forwards;
}

/* Hidden */
.tgc-hidden { display: none !important; }

/* Honeypot */
.tgc-hp { position: absolute; left: -9999px; }

/* Notification */
.tgc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 22px;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    z-index: 99999;
    animation: tgcSlideIn 0.3s ease;
}
@keyframes tgcSlideIn {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}
.tgc-notification.success { background: #2ecc71; }
.tgc-notification.error   { background: #e74c3c; }

/* ============================================
   Name Generator - Pink/Gold Theme
   ============================================ */
.tgc-naming .tgc-title { color: #d4547a; }
.tgc-naming .tgc-input:focus,
.tgc-naming .tgc-select:focus { border-color: #d4547a; }
.tgc-naming .tgc-radio-label.active {
    border-color: #d4547a;
    background: #fdf0f4;
    color: #d4547a;
}
.tgc-naming .tgc-btn-primary {
    background: linear-gradient(135deg, #d4547a, #c9944a);
    color: #fff;
}
.tgc-naming .tgc-btn-primary:hover {
    background: linear-gradient(135deg, #c24468, #b8843a);
}
.tgc-naming .tgc-btn-secondary {
    background: #fdf0f4;
    color: #d4547a;
    border: 2px solid #d4547a;
}
.tgc-naming .name-card {
    background: linear-gradient(135deg, #fff9fb, #fff5e9);
    border-left: 4px solid #d4547a;
}
.tgc-naming .name-card .name-main {
    font-size: 1.5rem;
    font-weight: 700;
    color: #d4547a;
    margin-bottom: 6px;
}
.tgc-naming .name-card .name-meaning {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 4px;
}
.tgc-naming .name-card .name-meta {
    display: flex;
    gap: 14px;
    font-size: 0.82rem;
    color: #999;
}
.tgc-naming .name-card .name-meta span {
    background: #fdf0f4;
    padding: 2px 10px;
    border-radius: 12px;
}
.tgc-naming .name-save-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    float: right;
    padding: 4px;
    transition: transform 0.2s;
}
.tgc-naming .name-save-btn:hover { transform: scale(1.2); }
.tgc-naming .name-save-btn.saved { color: #d4547a; }

.tgc-naming .saved-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #f0d0dd;
}
.tgc-naming .saved-section h3 {
    color: #d4547a;
    margin-bottom: 14px;
}
.tgc-naming .saved-name-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fdf0f4;
    padding: 6px 14px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.9rem;
}
.tgc-naming .saved-name-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #d4547a;
    font-size: 0.8rem;
    padding: 0 2px;
}

/* ============================================
   Letter Generator - Beige/Vintage Theme
   ============================================ */
.tgc-letter .tgc-title { color: #8b7355; }
.tgc-letter .tgc-input:focus,
.tgc-letter .tgc-select:focus { border-color: #8b7355; }
.tgc-letter .tgc-radio-label.active {
    border-color: #8b7355;
    background: #faf5ef;
    color: #8b7355;
}
.tgc-letter .tgc-btn-primary {
    background: linear-gradient(135deg, #8b7355, #a68b5b);
    color: #fff;
}
.tgc-letter .tgc-btn-primary:hover {
    background: linear-gradient(135deg, #7a6348, #96794b);
}
.tgc-letter .tgc-btn-secondary {
    background: #faf5ef;
    color: #8b7355;
    border: 2px solid #8b7355;
}
.tgc-letter .letter-output {
    background: linear-gradient(135deg, #fdf8f0, #f5ede0);
    border: 1px solid #e0d5c5;
    border-radius: 4px;
    padding: 40px 36px;
    margin: 20px 0;
    font-family: 'Georgia', 'Nanum Myeongjo', serif;
    font-size: 1.05rem;
    line-height: 2;
    color: #4a3f35;
    white-space: pre-wrap;
    box-shadow: 2px 3px 15px rgba(139,115,85,0.1);
    position: relative;
}
.tgc-letter .letter-output::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        transparent,
        transparent 31px,
        #e8ddd0 31px,
        #e8ddd0 32px
    );
    pointer-events: none;
    opacity: 0.5;
}
.tgc-letter .letter-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

/* ============================================
   Guestbook - Clean White/Blue Theme
   ============================================ */
.tgc-guestbook .tgc-title { color: #2980b9; }
.tgc-guestbook .tgc-input:focus,
.tgc-guestbook .tgc-textarea:focus { border-color: #2980b9; }
.tgc-guestbook .tgc-btn-primary {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: #fff;
}
.tgc-guestbook .tgc-btn-primary:hover {
    background: linear-gradient(135deg, #1f6fa0, #2980b9);
}
.tgc-guestbook .gb-form {
    background: #f8fbff;
    border: 2px solid #d6e9f8;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 30px;
}
.tgc-guestbook .gb-entry {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.tgc-guestbook .gb-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.tgc-guestbook .gb-content { flex: 1; }
.tgc-guestbook .gb-author {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.tgc-guestbook .gb-message {
    color: #555;
    font-size: 0.93rem;
    margin-bottom: 4px;
    word-break: break-word;
}
.tgc-guestbook .gb-time {
    font-size: 0.8rem;
    color: #aaa;
}
.tgc-guestbook .gb-empty {
    text-align: center;
    padding: 40px;
    color: #aaa;
}
.tgc-guestbook .gb-load-more {
    display: block;
    margin: 20px auto;
    background: #f0f7ff;
    color: #2980b9;
    border: 2px solid #2980b9;
    padding: 10px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
}
.tgc-guestbook .gb-load-more:hover {
    background: #2980b9;
    color: #fff;
}
.tgc-guestbook .gb-counter {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.tgc-guestbook .char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

/* ============================================
   Vote - Purple/Vibrant Theme
   ============================================ */
.tgc-vote .tgc-title { color: #7c4dff; }
.tgc-vote .poll-question {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 30px 0 24px;
    color: #333;
}
.tgc-vote .poll-vs {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 24px;
}
.tgc-vote .poll-option {
    flex: 1;
    padding: 30px 20px;
    border: 3px solid #e0e0e0;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: #fff;
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}
.tgc-vote .poll-option:hover {
    border-color: #7c4dff;
    background: #f5f0ff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(124,77,255,0.15);
}
.tgc-vote .poll-option.option-a:hover { border-color: #7c4dff; background: #f5f0ff; }
.tgc-vote .poll-option.option-b:hover { border-color: #ff4081; background: #fff0f5; }

.tgc-vote .poll-result {
    margin-bottom: 24px;
}
.tgc-vote .result-bar-wrap {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}
.tgc-vote .result-label {
    font-weight: 700;
    min-width: 100px;
    text-align: right;
    font-size: 0.95rem;
}
.tgc-vote .result-bar-bg {
    flex: 1;
    height: 36px;
    background: #f0f0f0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
}
.tgc-vote .result-bar {
    height: 100%;
    border-radius: 18px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 40px;
}
.tgc-vote .result-bar.bar-a {
    background: linear-gradient(135deg, #7c4dff, #a17dff);
}
.tgc-vote .result-bar.bar-b {
    background: linear-gradient(135deg, #ff4081, #ff79a1);
}
.tgc-vote .result-count {
    min-width: 60px;
    font-size: 0.85rem;
    color: #999;
}
.tgc-vote .poll-total {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.tgc-vote .tgc-btn-primary {
    background: linear-gradient(135deg, #7c4dff, #a17dff);
    color: #fff;
}
.tgc-vote .tgc-btn-primary:hover {
    background: linear-gradient(135deg, #6a3de8, #9070ef);
}
.tgc-vote .poll-nav {
    text-align: center;
    margin-top: 16px;
}
.tgc-vote .poll-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: #bbb;
    margin-bottom: 10px;
}
.tgc-vote .voted-badge {
    display: inline-block;
    background: #f3edff;
    color: #7c4dff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .tgc-wrap { padding: 14px 10px; }
    .tgc-title { font-size: 1.4rem; }
    .tgc-vote .poll-vs { flex-direction: column; }
    .tgc-vote .poll-question { font-size: 1.2rem; }
    .tgc-letter .letter-output { padding: 24px 18px; }
    .tgc-letter .letter-actions { flex-direction: column; }
}
