/* Wspólne style dla CRAKEN Investment Dashboard */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* Dashboard background (cosmic for index) */
.dashboard-body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #2e1065 50%, #4c1d95 75%, #6b21a8 100%);
    animation: cosmicShift 15s ease infinite;
}

@keyframes cosmicShift {
    0%, 100% { background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 25%, #2e1065 50%, #4c1d95 75%, #6b21a8 100%); }
    33% { background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 25%, #581c87 50%, #7c2d12 75%, #dc2626 100%); }
    66% { background: linear-gradient(135deg, #064e3b 0%, #065f46 25%, #047857 50%, #0891b2 75%, #0284c7 100%); }
}

/* Plan background (colorful for monthly plans) */
.plan-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); }
    50% { background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%); }
}

/* Stars for dashboard */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Floating emojis for plans */
.floating-emoji {
    position: absolute;
    font-size: 2em;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.emoji-1 { top: 10%; left: 5%; animation-delay: 0s; }
.emoji-2 { top: 20%; right: 10%; animation-delay: 1s; }
.emoji-3 { bottom: 30%; left: 8%; animation-delay: 2s; }
.emoji-4 { bottom: 15%; right: 5%; animation-delay: 3s; }

/* Main container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 2;
}

.dashboard-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
}

.plan-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    max-width: 1400px;
    border-radius: 24px;
}

/* Headers */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57);
    background-size: 300% 300%;
    animation: rainbowFlow 6s ease infinite;
    border-radius: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.plan-header {
    margin-bottom: 40px;
    padding: 30px;
    background-size: 200% 200%;
    animation: gradientAnimation 3s ease infinite;
    border-radius: 20px;
}

@keyframes rainbowFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: headerShine 3s infinite;
}

@keyframes headerShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header h1 {
    font-size: 3.5em;
    margin-bottom: 15px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
    font-weight: 900;
}

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

.header .subtitle {
    font-size: 1.4em;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* Goal section */
.goal-section {
    background: rgba(255,215,0,0.2);
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
    animation: goldenGlow 2s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
    0% { box-shadow: 0 0 20px rgba(255,215,0,0.3); }
    100% { box-shadow: 0 0 40px rgba(255,215,0,0.6); }
}

.goal-title {
    font-size: 2.2em;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.goal-amount {
    font-size: 3em;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    animation: pulse 2s infinite;
}

.budget-total {
    font-size: 1.8em;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 15px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Update badge */
.update-badge {
    background: #ff4757;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Status message */
.status-message {
    background: rgba(255,193,7,0.2);
    border: 2px solid #ffc107;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    animation: statusPulse 2s ease-in-out infinite alternate;
}

@keyframes statusPulse {
    0% { box-shadow: 0 0 15px rgba(255,193,7,0.3); }
    100% { box-shadow: 0 0 25px rgba(255,193,7,0.5); }
}

.status-title {
    font-size: 1.8em;
    color: #ffc107;
    margin-bottom: 10px;
    font-weight: 700;
}

.status-text {
    color: #ffffff;
    font-size: 1.1em;
}

/* Stats bar */
.stats-bar {
    display: flex;
    justify-content: space-around;
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2em;
    font-weight: 900;
    color: #ffd700;
    display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.stat-label {
    font-size: 0.9em;
    color: rgba(255,255,255,0.7);
    margin-top: 5px;
}

.update-date {
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    margin-top: 3px;
    font-style: italic;
}

/* Dashboard grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.investment-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Portfolio cards */
.portfolio-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 35px;
    border: 2px solid rgba(255,255,255,0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.crypto-section, .stocks-section {
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.portfolio-card:hover, .crypto-section:hover, .stocks-section:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.3);
}

.crypto-section:hover, .stocks-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-card::before, .crypto-section::before, .stocks-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.portfolio-card:hover::before, .crypto-section:hover::before, .stocks-section:hover::before {
    transform: translateX(100%);
}

.crypto-card {
    border-left: 5px solid #f39c12;
    background: linear-gradient(135deg, rgba(243,156,18,0.1), rgba(230,126,34,0.1));
}

.crypto-section {
    background: linear-gradient(135deg, rgba(255,193,7,0.1), rgba(255,87,34,0.1));
    border-color: #ffc107;
}

.stocks-card {
    border-left: 5px solid #27ae60;
    background: linear-gradient(135deg, rgba(39,174,96,0.1), rgba(46,204,113,0.1));
}

.stocks-section {
    background: linear-gradient(135deg, rgba(76,175,80,0.1), rgba(33,150,243,0.1));
    border-color: #4caf50;
}

/* Card headers */
.card-header, .section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.section-header {
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

.card-icon, .section-icon {
    font-size: 3em;
    margin-right: 20px;
    animation: bounce 2s infinite;
}

.section-icon {
    font-size: 2.5em;
    margin-right: 15px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.card-title, .section-title {
    font-size: 2em;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.section-title {
    font-size: 1.8em;
    color: #2c3e50;
    text-shadow: none;
}

.card-amount, .section-amount {
    font-size: 1.8em;
    font-weight: 600;
    color: #ffd700;
    margin-left: auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.section-amount {
    font-size: 1.4em;
    color: #e74c3c;
    text-shadow: none;
}

/* Portfolio items */
.portfolio-items {
    space-y: 15px;
}

.portfolio-item, .crypto-item, .stock-item {
    background: rgba(255,255,255,0.08);
    margin: 15px 0;
    padding: 20px;
    border-radius: 15px;
    border-left: 4px solid;
    transition: all 0.3s ease;
    position: relative;
}

.crypto-item, .stock-item {
    background: rgba(255,255,255,0.8);
    border-left: 5px solid #007bff;
}

.portfolio-item {
    opacity: 0.6;
}

.portfolio-item:hover, .crypto-item:hover, .stock-item:hover {
    transform: translateX(10px);
    background: rgba(255,255,255,0.12);
}

.crypto-item:hover, .stock-item:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.85);
}

.crypto-item {
    border-left-color: #f39c12;
}

.stock-item {
    border-left-color: #27ae60;
}

.portfolio-item.crypto-item {
    border-left-color: #f39c12;
}

.portfolio-item.stock-item {
    border-left-color: #27ae60;
}

/* Item content */
.item-row, .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-header {
    margin-bottom: 10px;
}

.item-name {
    font-weight: 700;
    font-size: 1.2em;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.crypto-item .item-name, .stock-item .item-name {
    color: #2c3e50;
    text-shadow: none;
    font-size: 1.1em;
}

.item-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #6b7280;
}

.item-details {
    margin-top: 10px;
    font-size: 0.9em;
    color: rgba(255,255,255,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.crypto-item .item-details, .stock-item .item-details {
    color: rgba(0,0,0,0.6);
}

/* Price and amounts */
.price {
    background: #34495e;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.price.updated {
    background: #e74c3c;
    animation: glow 2s infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(231, 76, 60, 0.5); }
    50% { box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
}

.amount {
    font-size: 1.2em;
    font-weight: 700;
    color: #e74c3c;
}

.shares {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
}

.date-check {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    opacity: 0.9;
}

.description {
    margin-top: 10px;
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

/* Price changes */
.price-change {
    font-size: 0.8em;
    margin-top: 5px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.price-up {
    color: #27ae60;
}

.price-down {
    color: #e74c3c;
}

.price-moon {
    color: #ffd700;
    animation: moonGlow 1s infinite;
}

@keyframes moonGlow {
    0%, 100% { text-shadow: 0 0 5px #ffd700; }
    50% { text-shadow: 0 0 15px #ffd700; }
}

.arrow {
    margin-right: 5px;
    font-weight: bold;
}

/* Monthly archive */
.monthly-archive {
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    padding: 35px;
    margin-top: 40px;
    border: 2px solid rgba(255,255,255,0.1);
}

.archive-title {
    font-size: 2.2em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.month-card {
    background: linear-gradient(135deg, rgba(147,51,234,0.2), rgba(79,70,229,0.2));
    border: 2px solid rgba(147,51,234,0.3);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.month-card:hover {
    transform: scale(1.05);
    border-color: rgba(147,51,234,0.6);
    box-shadow: 0 20px 40px rgba(147,51,234,0.3);
}

.month-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.month-card:hover::before {
    transform: translateX(100%);
}

.month-name {
    font-size: 1.5em;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.month-status {
    font-size: 1em;
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

.month-link {
    display: inline-block;
    background: linear-gradient(45deg, #9333ea, #4f46e5);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.month-link:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(147,51,234,0.4);
}

/* Footer */
.footer {
    margin-top: 50px;
    text-align: center;
    padding: 30px;
    background: linear-gradient(45deg, #1f2937, #374151);
    color: white;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.plan-footer {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    border-radius: 15px;
}

.footer-title {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #ffd700;
}

.date-info {
    font-size: 1.1em;
    margin-bottom: 10px;
}

.disclaimer {
    font-size: 0.9em;
    opacity: 0.8;
    line-height: 1.5;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid, .archive-grid, .investment-sections {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2.5em;
    }
    
    .plan-header h1 {
        font-size: 2em;
    }
    
    .goal-amount {
        font-size: 2.2em;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 20px;
    }
}