* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-feature-settings: "tnum";
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    font-variant-numeric: tabular-nums lining-nums;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1em;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-section {
    max-width: 500px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.auth-form {
    display: none;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.message.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    display: block;
}

.wishlist-header {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.wishlist-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.wishlist-actions button {
    flex: 1;
}

.edit-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.edit-section h3 {
    margin-bottom: 15px;
}

.edit-section input,
.edit-section textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.edit-section form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.edit-section button {
    width: auto;
}

.share-section {
    background: #e6fffa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #48bb78;
}

.share-link-container {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.share-link-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #48bb78;
    border-radius: 8px;
    background: white;
}

.help-text {
    color: #2f855a;
    font-size: 0.9em;
    margin-top: 10px;
}

.add-item-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.add-item-section h3 {
    margin-bottom: 15px;
}

.add-item-section input,
.add-item-section textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.items-section {
    margin-top: 30px;
}

.items-section h3 {
    margin-bottom: 20px;
}

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

.item-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    transition: all 0.3s;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.item-card.reserved {
    border-color: #48bb78;
    background: #f0fff4;
}

.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f0f0f0;
}

.item-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.item-description {
    color: #666;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.item-price {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.item-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.item-link:hover {
    text-decoration: underline;
}

.item-reserved {
    background: #48bb78;
    color: white;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 10px;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.item-actions button {
    flex: 1;
    padding: 8px;
    font-size: 0.9em;
}

.friend-name-section {
    background: #fef5e7;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #f39c12;
}

.friend-name-section input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    margin-top: 10px;
    border: 2px solid #f39c12;
    border-radius: 8px;
    font-size: 1em;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    color: white;
    transition: all 0.3s ease;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-whatsapp {
    background: #25D366;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-twitter {
    background: #1DA1F2;
}

.btn-twitter:hover {
    background: #0d8ed9;
}

.btn-telegram {
    background: #0088cc;
}

.btn-telegram:hover {
    background: #006699;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

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

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.modal-actions .btn {
    flex: 1;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-edit:hover {
    background: #e0a800;
}

.link-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-input-container input {
    flex: 1;
    margin-bottom: 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.image-preview-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

.image-preview-container img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #667eea;
    background: #fff;
}

.btn-clear-preview {
    width: 28px;
    height: 28px;
    border: none;
    background: #f56565;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-clear-preview:hover {
    background: #e53e3e;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .wishlist-actions {
        flex-direction: column;
    }
    
    .social-share-buttons {
        flex-direction: column;
    }
    
    .btn-share {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}
