/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    color: #f0f6fc;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Фоновая анимация */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(35, 134, 54, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(31, 111, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(247, 129, 102, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

/* Главный контейнер */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideInDown 1s ease-out;
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-50px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #58a6ff, #f0f6fc, #f78166);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px rgba(88, 166, 255, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(88, 166, 255, 0.6)); }
}

.subtitle {
    font-size: 1.2rem;
    color: #7d8590;
    font-weight: 400;
    margin-bottom: 30px;
}

/* Панель управления */
.control-panel {
    background: rgba(22, 27, 34, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInUp 1s ease-out 0.2s both;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

/* Кнопки */
.btn {
    background: linear-gradient(135deg, #238636, #2ea043);
    color: #ffffff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(35, 134, 54, 0.3);
}

.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(-3px);
    box-shadow: 0 8px 25px rgba(35, 134, 54, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* Специальные кнопки */
.btn-secondary {
    background: linear-gradient(135deg, #30363d, #484f58);
    box-shadow: 0 4px 15px rgba(48, 54, 61, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(48, 54, 61, 0.4);
}

.btn-orange {
    background: linear-gradient(135deg, #f78166, #ff8a65);
    box-shadow: 0 4px 15px rgba(247, 129, 102, 0.3);
}

.btn-orange:hover {
    box-shadow: 0 8px 25px rgba(247, 129, 102, 0.4);
}

.btn-loading {
    background: linear-gradient(135deg, #484f58, #6e7681);
    cursor: not-allowed;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Область результата */
.result-area {
    background: rgba(13, 17, 23, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(48, 54, 61, 0.5);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-height: 300px;
    animation: slideInUp 1s ease-out 0.4s both;
}

.result-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #58a6ff;
    border-bottom: 2px solid rgba(88, 166, 255, 0.3);
    padding-bottom: 10px;
}

.idea-card {
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(48, 54, 61, 0.3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    animation: slideIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.idea-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #238636, #58a6ff, #f78166);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.idea-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f0f6fc;
    margin-bottom: 20px;
    text-align: center;
}

.idea-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    background: rgba(13, 17, 23, 0.5);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #238636;
}

.detail-label {
    font-weight: 600;
    color: #7d8590;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.1rem;
    color: #f0f6fc;
    font-weight: 500;
}

.idea-description {
    background: rgba(13, 17, 23, 0.7);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(48, 54, 61, 0.3);
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e6edf3;
    font-style: italic;
}

/* Статус бар */
.status-bar {
    background: rgba(22, 27, 34, 0.6);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(48, 54, 61, 0.3);
    color: #7d8590;
    font-size: 0.9rem;
    text-align: center;
    animation: slideInUp 1s ease-out 0.6s both;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: #161b22;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    border: 1px solid #30363d;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideInDown 0.3s ease-out;
    position: relative;
}

.modal-header {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #f0f6fc;
    text-align: center;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #7d8590;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #f85149;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #f0f6fc;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.category-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #30363d;
    border-radius: 8px;
    background: #0d1117;
}

.category-item {
    padding: 12px 15px;
    border-bottom: 1px solid #21262d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.category-item:hover {
    background: #21262d;
}

.category-item:last-child {
    border-bottom: none;
}

.delete-btn {
    background: #f85149;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.delete-btn:hover {
    background: #da3633;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .button-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        min-width: auto;
        width: 100%;
    }
    
    .idea-details {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .control-panel,
    .result-area {
        padding: 20px;
    }
}

/* Дополнительные анимации */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.bounce {
    animation: bounce 0.6s;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -20px, 0); }
    70% { transform: translate3d(0, -10px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #161b22;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}
