* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Анимированный фон */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at top, #1a1a2e 0%, #0f0f0f 50%, #000 100%);
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f);
    border-radius: 50%;
    animation: float 8s infinite ease-in-out;
    opacity: 0.1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-30px) rotate(270deg); }
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ffd23f, #ff6b35);
    opacity: 0.1;
    animation: wave 10s infinite linear;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Навигация */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand a {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from { filter: brightness(1); }
    to { filter: brightness(1.3); }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.user-details {
    text-align: center;
}

.username {
    font-weight: bold;
    color: #ffd23f;
}

.user-role {
    font-size: 12px;
    color: #ccc;
}

.logout-btn {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid #ff6b35;
    color: #ff6b35;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
}

.logout-btn:hover {
    background: #ff6b35;
    color: white;
}

/* Авторизация */
.auth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: all 0.5s ease;
}

.auth-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    max-width: 90vw;
    animation: authSlideIn 0.8s ease-out;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

@keyframes authSlideIn {
    from { transform: translateY(-50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.auth-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    color: #ccc;
}

.auth-tab.active {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    color: white;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffd23f;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
    transform: translateY(-2px);
}

.btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.4);
}

/* Главное приложение */
.app-container {
    padding-top: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.title {
    font-size: 3.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f, #ff6b35);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    animation: slideInUp 0.8s ease-out;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes slideInUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.tab:hover::before {
    left: 100%;
}

.tab.active {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.deals-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    min-height: 300px;
}

.deal-item {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    animation: dealAppear 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

@keyframes dealAppear {
    from { transform: translateX(-30px) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

.deal-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: right 0.6s;
}

.deal-item:hover::before {
    right: 100%;
}

.deal-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.deal-profit-high { border-left-color: #00ff88; }
.deal-profit-medium { border-left-color: #ffaa00; }
.deal-profit-low { border-left-color: #ff4444; }

.deal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.deal-name {
    font-size: 20px;
    font-weight: bold;
    color: #ffd23f;
}

.deal-profit {
    font-size: 18px;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 25px;
    animation: profitPulse 2s infinite;
}

@keyframes profitPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.profit-high { 
    background: rgba(0, 255, 136, 0.2); 
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}
.profit-medium { 
    background: rgba(255, 170, 0, 0.2); 
    color: #ffaa00;
    box-shadow: 0 0 20px rgba(255, 170, 0, 0.3);
}
.profit-low { 
    background: rgba(255, 68, 68, 0.2); 
    color: #ff4444;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

.deal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    font-size: 14px;
    color: #ccc;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 8px;
    animation: statGlow 3s infinite;
}

@keyframes statGlow {
    0%, 100% { text-shadow: 0 0 10px currentColor; }
    50% { text-shadow: 0 0 20px currentColor; }
}

.stat-label {
    font-size: 14px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievements {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.achievement:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.achievement.unlocked {
    border-left: 4px solid #00ff88;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.achievement-icon {
    font-size: 2rem;
    opacity: 0.5;
}

.achievement.unlocked .achievement-icon {
    opacity: 1;
    animation: achievementGlow 2s infinite;
}

@keyframes achievementGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.no-deals {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 60px;
    font-size: 18px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00ff88;
    color: #00ff88;
}

.alert-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.alert-info {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
}

.hidden { display: none !important; }
.show { display: block !important; }

@media (max-width: 768px) {
    .title { font-size: 2.5rem; }
    .container { padding: 15px; }
    .nav-container { padding: 0 15px; }
    .nav-menu { gap: 15px; }
    .deal-details { grid-template-columns: 1fr; }
    .stats-container { grid-template-columns: repeat(2, 1fr); }
    .user-info { 
        position: relative; 
        margin: 0 auto 20px; 
        justify-content: center;
    }
}

/* Стили для кнопки удаления сделок */
.deal-actions {
    position: absolute;
    top: 15px;
    right: 15px;
}

.btn-delete {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    color: #ff4444;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

.btn-delete:hover {
    background: rgba(255, 68, 68, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.5);
}

.btn-delete:active {
    transform: scale(0.95);
}
