/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    transition: background 0.5s ease;
    position: relative;
    overflow-x: hidden;
}

/* Floating background text */
.floating-text {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    font-size: 2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    z-index: -1;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.08);
    animation: floatText 15s linear infinite;
    white-space: nowrap;
}

@keyframes floatText {
    0% {
        transform: translate(-200%, -200%) rotate(30deg);
    }
    100% {
        transform: translate(200%, 200%) rotate(30deg);
    }
}

/* Theme variations */
body.theme-nature {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 50%, #2f855a 100%);
}

body.theme-sunset {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 50%, #dd6b20 100%);
}

body.theme-ocean {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 50%, #2c5282 100%);
}

body.theme-forest {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 50%, #22543d 100%);
}

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

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

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

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Theme selector */
.theme-selector {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.theme-circles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.theme-circle:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(255,255,255,0.4);
}

.theme-circle.active {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}

.theme-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #553c9a 100%);
}

.theme-nature {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 50%, #2f855a 100%);
}

.theme-sunset {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 50%, #dd6b20 100%);
}

.theme-ocean {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 50%, #2c5282 100%);
}

.theme-forest {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 50%, #22543d 100%);
}

/* Main content layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

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

/* Trade creator sections */
.trade-creator {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trade-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 500px;
}

.trade-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-section h2 i {
    color: #667eea;
}

/* Items container */
.items-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 80px;
}

.add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f7fafc;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.add-item-btn:hover {
    border-color: #667eea;
    background: #edf2f7;
    color: #667eea;
    transform: translateY(-2px);
}

/* Item cards */
.item-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.item-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.item-details {
    display: flex;
    gap: 12px;
    font-size: 0.9rem;
    color: #718096;
}

.item-quantity {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.item-rarity {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rarity-common { background: #a0aec0; color: white; }
.rarity-uncommon { background: #48bb78; color: white; }
.rarity-rare { background: #4299e1; color: white; }
.rarity-epic { background: #9f7aea; color: white; }
.rarity-legendary { background: #f6ad55; color: white; }
.rarity-currency { background: #f6e05e; color: #744210; }

.item-age {
    font-size: 0.85rem;
    color: #48bb78;
    margin-top: 4px;
    font-weight: 500;
}

.trade-note {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #4a5568;
}

.remove-item {
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.remove-item:hover {
    background: #feb2b2;
    transform: scale(1.05);
}

/* Trade preview */
.trade-preview {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    max-width: 500px;
}

.trade-preview h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-container {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    text-align: center;
    color: #a0aec0;
}

.preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Trade display */
.trade-display {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-height: 300px;
}

.trade-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.trade-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.trade-subtitle {
    color: #718096;
    font-size: 1rem;
}

.trade-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.trade-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trade-column h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trade-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trade-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-item-info {
    flex: 1;
}

.trade-item-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.trade-item-details {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #718096;
}

/* Trade note section */
.trade-note-section {
    margin-bottom: 20px;
}

.trade-note-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.trade-note-section textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.trade-note-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 4px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    margin-bottom: 25px;
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.youtube-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.youtube-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.youtube-link i {
    color: #ff0000;
    font-size: 1.1rem;
}

/* Responsive design */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .trade-section,
    .trade-preview {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
    
    .footer {
        bottom: 15px;
        left: 15px;
    }
    
    .youtube-link {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* Animation for items */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card {
    animation: slideIn 0.3s ease;
}

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

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