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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

.logo i {
    margin-right: 0.5rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: background 0.3s;
}

.nav-links a.active, .nav-links a:hover {
    background: rgba(255,255,255,0.2);
}

.hero {
    text-align: center;
    padding: 3rem 2rem;
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #ff6b6b;
    color: white;
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,107,0.6);
}

.btn-secondary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(102,126,234,0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.5);
}

.btn-danger {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.btn-small {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 0.5rem;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

section {
    margin-bottom: 3rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #444;
}

h2 span {
    font-size: 1rem;
    color: #888;
    display: block;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
}

.tips-container {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.history-card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.history-card .type-tag {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.history-card p {
    margin: 1rem 0;
}

.no-data {
    text-align: center;
    color: #888;
    grid-column: 1 / -1;
}

.generator-panel {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.generator-form {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group input[type="number"] {
    width: 100%;
}

.result-area {
    flex: 2;
    min-width: 300px;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

.result-item {
    background: #f9f9f9;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.result-item .actions {
    margin-top: 0.5rem;
}

.result-item .actions button {
    margin-right: 0.5rem;
    padding: 0.3rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.admin-main {
    max-width: 900px;
}

.admin-panel {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.panel-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.panel-section h2 {
    font-size: 1.5rem;
}

.panel-section form label {
    display: block;
    margin-top: 1rem;
}

.panel-section form input {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.panel-section form button {
    margin-top: 1rem;
}

.login-form {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.login-form input {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.msg {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.msg.error {
    background: #f8d7da;
    color: #721c24;
}

.msg.success {
    background: #d4edda;
    color: #155724;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 0.7rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.about-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.about-content ul {
    list-style: none;
    padding-left: 0;
}

.about-content ul li::before {
    content: "✓ ";
    color: #667eea;
}

footer {
    text-align: center;
    padding: 1.5rem;
    background: #333;
    color: white;
    margin-top: auto;
}

footer a {
    color: #ff6b6b;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
    }

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

    .hero h1 {
        font-size: 1.6rem;
    }

    .generator-panel {
        flex-direction: column;
    }

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