/* TikTok Tags Generator - Main Styles */
.ttg-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.ttg-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    border: 1px solid #e1e5e9;
}

.ttg-header {
    text-align: center;
    margin-bottom: 30px;
}

.ttg-title {
    color: #000000;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ttg-title i {
    color: #fe2c55; /* TikTok brand color */
}

.ttg-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

.ttg-input-section {
    margin-bottom: 25px;
}

.ttg-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.ttg-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.ttg-input:focus {
    outline: none;
    border-color: #fe2c55;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.1);
}

.ttg-generate-btn {
    padding: 16px 24px;
    background: linear-gradient(135deg, #fe2c55, #25f4ee);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ttg-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 44, 85, 0.3);
}

.ttg-generate-btn:active {
    transform: translateY(0);
}

.ttg-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ttg-char-count {
    text-align: right;
    font-size: 14px;
    color: #888;
}

.ttg-loading {
    text-align: center;
    padding: 40px 20px;
}

.ttg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #fe2c55;
    border-radius: 50%;
    animation: ttg-spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes ttg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ttg-loading p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

.ttg-results {
    margin-top: 10px;
}

.ttg-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ttg-results-title {
    color: #000;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ttg-copy-all-btn {
    padding: 10px 16px;
    background: #000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ttg-copy-all-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.ttg-tags-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.ttg-tag {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.ttg-tag:hover {
    background: #ffffff;
    border-color: #fe2c55;
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.1);
}

.ttg-tag-text {
    font-size: 14px;
    color: #000;
    font-weight: 500;
    word-break: break-word;
    flex: 1;
    margin-right: 10px;
}

.ttg-copy-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ttg-copy-btn:hover {
    background: #fe2c55;
    border-color: #fe2c55;
    color: white;
}

.ttg-copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.ttg-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 16px;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.ttg-error i {
    font-size: 18px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .ttg-container {
        padding: 15px;
    }
    
    .ttg-card {
        padding: 20px;
        border-radius: 12px;
    }
    
    .ttg-title {
        font-size: 24px;
    }
    
    .ttg-input-group {
        flex-direction: column;
    }
    
    .ttg-generate-btn {
        justify-content: center;
    }
    
    .ttg-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .ttg-copy-all-btn {
        align-self: flex-end;
    }
    
    .ttg-tags-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .ttg-container {
        padding: 10px;
    }
    
    .ttg-card {
        padding: 15px;
    }
    
    .ttg-title {
        font-size: 20px;
    }
    
    .ttg-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .ttg-tag {
        padding: 10px 12px;
    }
}

/* Success message */
.ttg-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    animation: ttg-slideIn 0.3s ease;
}

@keyframes ttg-slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}