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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fc;
    color: #1a1a2e;
    line-height: 1.6;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 2rem;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: white;
    background: rgba(255,255,255,0.15);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #ff4757;
    color: white;
}

.btn-danger:hover {
    background: #ff3838;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* Features */
.features {
    padding: 80px 0;
}

.features h2, .generator-preview h2, .history-preview h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: #1a1a2e;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Generator Preview */
.generator-preview {
    padding: 60px 0;
    background: white;
}

.generator-form {
    max-width: 700px;
    margin: 0 auto;
    background: #f8f9fc;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.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.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.result-area {
    max-width: 700px;
    margin: 30px auto;
    background: #f8f9fc;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    min-height: 150px;
    white-space: pre-wrap;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* History Preview */
.history-preview {
    padding: 80px 0;
}

.history-list {
    max-width: 800px;
    margin: 0 auto 30px;
}

.history-item {
    background: white;
    padding: 20px 25px;
    border-radius: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.04);
    transition: all 0.3s;
}

.history-item:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.type-badge {
    background: #667eea;
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.preview-text {
    flex: 1;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
}

.empty-hint {
    text-align: center;
    color: #999;
    font-size: 1.1rem;
    padding: 40px 0;
}

/* Footer */
footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
}

.footer-content p {
    margin: 5px 0;
}

.footer-content a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: white;
}

/* Admin */
.login-form {
    max-width: 400px;
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
}

.error {
    color: #ff4757;
    text-align: center;
    margin-bottom: 15px;
}

.admin-dashboard {
    padding: 40px 0;
}

.admin-dashboard h2 {
    text-align: center;
    margin-bottom: 30px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.tab-btn {
    padding: 12px 28px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
}

.tab-content h3 {
    margin-bottom: 25px;
}

.template-list {
    margin-top: 30px;
}

.template-item {
    background: #f8f9fc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

.template-item strong {
    min-width: 120px;
}

.template-item p {
    flex: 1;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        flex-direction: column;
        padding: 20px;
        gap: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .history-item {
        flex-direction: column;
        text-align: center;
    }

    .admin-tabs {
        flex-direction: column;
        align-items: center;
    }
}

/* Pages */
.page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.page-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.page-content {
    padding: 60px 0;
}

.batch-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    align-items: flex-end;
}

.batch-controls .form-group {
    flex: 1;
    min-width: 150px;
}

.export-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 30px;
}