/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FFC2D1;
    background-image: repeating-linear-gradient(
        45deg,
        #FFE5EC 0,
        #FFE5EC 20px,
        #FFC2D1 20px,
        #FFC2D1 40px
    );
}

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

/* Typography */
h1, h2, h3 {
    font-family: 'Crafty Girls', cursive;
    color: #FB6F92;
}

.main-title {
    font-size: 3rem;
    text-align: center;
    margin: 2rem 0;
    color: #FB6F92;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-size: 2.2rem;
    margin: 2rem 0 1rem;
    text-align: center;
}

/* Introduction Section */
.intro-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #fff 0%, #fef5f9 100%);
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.intro-text {
    text-align: center;
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: #555;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.example-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.example-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.example-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.example-card h3 {
    padding: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.example-card p {
    padding: 0 1rem 1rem;
    color: #666;
    text-align: center;
}

/* Chat Section */
.chat-section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.section-intro {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

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

.chat-messages {
    height: 400px;
    overflow-y: auto;
    border: 2px solid #f8bbd0;
    border-radius: 15px;
    padding: 1.5rem;
    background: #fefefe;
    margin-bottom: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

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

.user-message {
    background: #f8bbd0;
    margin-left: 20%;
    border-bottom-right-radius: 3px;
}

.bot-message {
    background: #fce4ec;
    margin-right: 20%;
    border-bottom-left-radius: 3px;
}

.chat-input-container {
    display: flex;
    gap: 1rem;
}

.chat-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #f8bbd0;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #f06292;
}

.send-button {
    padding: 1rem 2rem;
    background: #e91e63;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.send-button:hover {
    background: #c2185b;
}

/* Upload Section */
.upload-section {
    background: linear-gradient(135deg, #fef5f9 0%, #fff 100%);
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

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

.upload-area {
    border: 3px dashed #f48fb1;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.upload-area:hover {
    border-color: #f06292;
    background: #fff0f5;
}

.upload-area.dragover {
    border-color: #e91e63;
    background: #fce4ec;
}

.upload-icon {
    color: #FB6F92;
    margin-bottom: 1rem;
}

.preview-container {
    text-align: center;
    margin-top: 2rem;
}

.preview-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.analyze-button, .clear-button {
    padding: 0.8rem 2rem;
    margin: 0.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analyze-button {
    background: #e91e63;
    color: white;
}

.analyze-button:hover {
    background: #c2185b;
}

.clear-button {
    background: #e0e0e0;
    color: #333;
}

.clear-button:hover {
    background: #ccc;
}

.suggestions-container {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.suggestions-list {
    list-style: none;
    padding: 0;
}

.suggestions-list li {
    padding: 1rem;
    margin: 0.5rem 0;
    background: #fce4ec;
    border-radius: 10px;
    border-left: 4px solid #e91e63;
    animation: slideIn 0.5s ease;
}

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

/* Loading states */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.footer-section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.footer-title {
    text-align: center;
}

.video-section {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    margin: 3rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.video-title {
    font-family: 'Crafty Girls', cursive;
    color: #FB6F92;
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
}

.video-container {
    text-align: center;
}

.crochet-video {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}