* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

#root {
    max-width: 1200px;
    margin: 0 auto;
}

.app {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* Container */
.container {
    padding: 30px;
}

/* Form Styles */
.form-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.form-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.form-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.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.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-reset {
    background: #e0e0e0;
    color: #333;
    flex: 1;
}

.btn-reset:hover {
    background: #d0d0d0;
}

.btn-delete {
    background: #ff6b6b;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #ff5252;
}

.btn-edit {
    background: #4ecdc4;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #45b8b0;
}

/* List Styles */
.list-section {
    margin-top: 30px;
}

.list-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.investment-count {
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Investment List */
.investment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.investment-table thead {
    background: #f0f0f0;
    border-bottom: 2px solid #ddd;
}

.investment-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.investment-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
}

.investment-table tbody tr:hover {
    background: #f9f9f9;
}

.investment-amount {
    color: #667eea;
    font-weight: 600;
}

.investment-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.type-stocks {
    background: #e3f2fd;
    color: #1976d2;
}

.type-bonds {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-crypto {
    background: #fff3e0;
    color: #f57c00;
}

.type-real-estate {
    background: #e8f5e9;
    color: #388e3c;
}

.type-other {
    background: #f5f5f5;
    color: #666;
}

.investment-date {
    color: #999;
    font-size: 0.9rem;
}

.actions {
    display: flex;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }

    .container {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }

    .form-group {
        grid-template-columns: 1fr;
    }

    .investment-table {
        font-size: 0.9rem;
    }

    .investment-table th,
    .investment-table td {
        padding: 10px;
    }

    .actions {
        flex-direction: column;
    }

    button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .container {
        padding: 15px;
    }

    .form-section {
        padding: 15px;
    }

    .investment-table {
        font-size: 0.8rem;
    }

    .investment-table th,
    .investment-table td {
        padding: 8px;
    }
}

/* Loading and Messages */
.loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #2e7d32;
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.investment-row {
    animation: slideIn 0.3s ease-out;
}
