* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* ---------------- NAVBAR ---------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffd700;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* ---------------- MAIN CONTAINER ---------------- */
.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeIn 0.6s ease;
}

.section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    text-align: center;
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* ---------------- CONTACT FORM ---------------- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #27ae60;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e74c3c;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

.input-error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

.btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* ---------------- TO-DO LIST ---------------- */
.todo-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.todo-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
}

.add-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4);
}

.todo-list {
    max-height: 400px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(102, 126, 234, 0.05);
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

.todo-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.todo-text {
    flex: 1;
    margin-right: 1rem;
}

.todo-text.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.complete-btn {
    background: #27ae60;
    color: white;
}

.complete-btn:hover {
    background: #2ecc71;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
}

.todo-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

/* ---------------- SUCCESS MESSAGE ---------------- */
.success-message {
    background: #27ae60;
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------- IMAGE UPLOAD ---------------- */
.upload-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.upload-btn {
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.upload-btn:hover {
    background: #0056b3;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* ---------------- MODAL ---------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
}

.preview-content {
    text-align: center;
}

.preview-image {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
}

/* ---------------- ANIMATIONS ---------------- */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        background: rgba(102, 126, 234, 0.95);
        backdrop-filter: blur(10px);
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .container {
        gap: 1.5rem;
        padding: 1rem;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .todo-input-container {
        flex-direction: column;
    }

    .todo-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .section h2 {
        font-size: 1.5rem;
    }

    .todo-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .todo-actions {
        justify-content: center;
    }
}
