* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #1a202c;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.input-section {
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease;
}

.input-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.input-card h2 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #718096;
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-group label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.generate-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner {
    display: inline-block;
    vertical-align: middle;
}

.spinner {
    animation: rotate 2s linear infinite;
    height: 20px;
    width: 20px;
}

.spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.results-section {
    animation: fadeIn 0.6s ease;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.results-header h2 {
    color: #2d3748;
    font-size: 1.8rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.filter-tab {
    padding: 10px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #718096;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-tab:hover:not(.active) {
    background: #f7fafc;
}

.hooks-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.hook-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease;
}

.hook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.hook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.hook-number {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.hook-category {
    background: #f7fafc;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #4a5568;
}

.hook-content {
    margin-bottom: 15px;
}

.hook-message {
    color: #2d3748;
    font-size: 1.05rem;
    line-height: 1.6;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.hook-part {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    line-height: 1.5;
}

.hook-part strong {
    display: inline-block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hook-opening {
    background: #fff5f5;
    border-left: 3px solid #f56565;
    color: #2d3748;
}

.hook-body {
    background: #f0fff4;
    border-left: 3px solid #48bb78;
    color: #2d3748;
}

.hook-cta {
    background: #ebf8ff;
    border-left: 3px solid #4299e1;
    color: #2d3748;
    font-weight: 500;
}

.hook-explanation {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    padding: 10px;
    background: #fef5e7;
    border-radius: 8px;
}

.hook-actions {
    display: flex;
    gap: 10px;
}

.copy-btn,
.favorite-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn {
    background: #667eea;
    border: none;
    color: white;
}

.copy-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.favorite-btn {
    background: white;
    border: 2px solid #e2e8f0;
    color: #718096;
}

.favorite-btn:hover {
    border-color: #fc8181;
    color: #fc8181;
}

.favorite-btn.active {
    background: #fff5f5;
    border-color: #fc8181;
    color: #fc8181;
}

.strategy-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.strategy-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.strategy-content {
    color: #4a5568;
    line-height: 1.8;
}

.strategy-text {
    padding: 20px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #764ba2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-content h3 {
    margin-bottom: 30px;
    color: #2d3748;
}

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.export-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-option:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-5px);
}

.export-option:hover svg {
    stroke: white;
}

/* Toast */
.toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    background: #2d3748;
    color: white;
    border-radius: 10px;
    font-weight: 500;
    transition: bottom 0.3s ease;
    z-index: 2000;
}

.toast.show {
    bottom: 30px;
}

.toast.success {
    background: #48bb78;
}

.toast.error {
    background: #f56565;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .hooks-container {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
}