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

html {
    font-size: 62.5%;
}

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

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

.main-content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
    margin-top: 20px;
}

.sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.sidebar h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.9rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.category-list {
    list-style: none;
}

.category-item {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 500;
    font-size: 1.5rem;
}

.category-item:hover {
    background: #f0f0f0;
    color: #667eea;
}

.category-item.active {
    background: #667eea;
    color: white;
}

.category-icon {
    margin-right: 10px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

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

header p {
    font-size: 1.8rem;
    opacity: 0.9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 10px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.card-icon {
    font-size: 4.8rem;
    margin-bottom: 15px;
}

.card-title {
    font-size: 2.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.card-desc {
    font-size: 1.5rem;
    color: #666;
    line-height: 1.5;
}

.footer {
    text-align: center;
    color: white;
    margin-top: 50px;
    padding: 20px;
    opacity: 0.8;
}

.guestbook-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

.message-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.message-list h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.4rem;
}

.message-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.message-item:hover {
    background: #f8f9fa;
}

.message-item:last-child {
    border-bottom: none;
}

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

.message-author {
    font-weight: 600;
    color: #667eea;
}

.message-time {
    font-size: 1.4rem;
    color: #999;
}

.message-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.message-reply {
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    padding: 12px 15px;
    margin-top: 15px;
    border-radius: 4px;
}

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

.reply-author {
    font-weight: 600;
    color: #764ba2;
    font-size: 1.4rem;
}

.reply-time {
    font-size: 1.3rem;
    color: #999;
}

.reply-content {
    color: #555;
    line-height: 1.5;
    font-size: 1.5rem;
}

.reply-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1.4rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 10px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-reply {
    padding: 6px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-reply:hover {
    background: #764ba2;
}

.message-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.message-form h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.1rem;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.5rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #764ba2;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar {
        position: static;
    }

    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .category-item {
        flex: 1 1 auto;
        min-width: 100px;
        text-align: center;
        margin-bottom: 0;
        padding: 10px;
        font-size: 1.4rem;
    }

    .category-icon {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 1.9rem;
    }

    .guestbook-content {
        grid-template-columns: 1fr;
    }

    .message-form {
        order: -1;
        position: static;
    }

    header h1 {
        font-size: 2.9rem;
    }

    header p {
        font-size: 1.6rem;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .card {
        padding: 25px 15px;
    }

    .card-icon {
        font-size: 4rem;
    }

    .card-title {
        font-size: 1.8rem;
    }

    .card-desc {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px;
    }

    header {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    header h1 {
        font-size: 2.4rem;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card {
        padding: 20px 10px;
    }

    .card-icon {
        font-size: 3.2rem;
    }

    .card-title {
        font-size: 1.6rem;
    }

    .card-desc {
        font-size: 1.2rem;
    }
}
