/* --- styles.css --- */
/* --- VARIABLES & RESET --- */
:root {
    --bg-color: #0a0a0a;
    --card-bg: #151515;
    --card-bg-light: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #aaa;
    --accent: #7b68ee;
    --accent-light: #9370db;
    --steam-color: #171a21;
    --steam-accent: #66c0f4;
    --gap: 20px;
    --radius: 12px;
    --transition: 
  transform 0.4s ease,
  box-shadow 0.4s ease,
  background 0.4s ease,
  border-color 0.4s ease,
  color 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    padding: 0;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(120, 119, 198, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(120, 119, 198, 0.03) 0%, transparent 20%);
}

/* --- LAYOUT SYSTEM --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

.main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    margin-bottom: 40px;
    z-index: 0;
}

/* --- HEADER --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover {
    color: white;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

/* --- HERO SECTION --- */
.hero {
    grid-column: span 3;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(20, 20, 30, 0.9));
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(123, 104, 238, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 800;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 400;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 600px;
}

.hero-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* --- CARDS --- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(123, 104, 238, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    will-change: transform, box-shadow;
}

.card h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: white;
    font-weight: 700;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(123, 104, 238, 0.1);
    border-radius: 20px;
}

/* --- STEAM WIDGET MEJORADO --- */
.steam-widget {
    grid-column: span 1;
    background: linear-gradient(135deg, rgba(23, 26, 33, 0.95), rgba(15, 17, 21, 0.98));
    
    position: relative;
    overflow: hidden;
    z-index: 0;
    border: none;
}

.steam-widget::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    opacity: 0.7;
    background: linear-gradient(90deg, transparent, var(--steam-accent), transparent);
    z-index: 0;
}

.steam-widget:hover {
    border-color: rgba(102, 192, 244, 0.3);
}

.steam-header {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.steam-logo {
    width: 28px;
    height: 28px;
    filter: brightness(1.2);
    transition: transform 0.2s ease;
}

.steam-header:hover .steam-logo {
    transform: scale(1.05);
}

.steam-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--steam-accent);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    position: relative;
}

.status-dot.online {
    background-color: #00b894;
    box-shadow: 0 0 8px rgba(0, 184, 148, 0.4);
}

.status-dot.online::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: rgba(0, 184, 148, 0.2);
    animation: pulse 2s infinite;
}

.status-dot.ingame {
    background-color: #fdcb6e;
    box-shadow: 0 0 8px rgba(253, 203, 110, 0.4);
}

.status-dot.ingame::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: rgba(253, 203, 110, 0.2);
    animation: pulse 1s infinite;
}

.status-dot.offline {
    background-color: #636e72;
    box-shadow: 0 0 8px rgba(99, 110, 114, 0.4);
}

.status-dot.away {
    background-color: #fdcb6e;
    box-shadow: 0 0 8px rgba(253, 203, 110, 0.4);
}

.status-dot.away::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: rgba(253, 203, 110, 0.2);
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
}

.steam-games {
    margin: 10px 0;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.steam-games::-webkit-scrollbar {
    width: 3px;
}

.steam-games::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.steam-games::-webkit-scrollbar-thumb {
    background: rgba(23, 26, 33, 0.9);
    border-radius: 10px;
}

.steam-games {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 26, 33, 0.9) rgba(255, 255, 255, 0.05);
}

.game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.game-item:hover {
    background: rgba(102, 192, 244, 0.08);
    border-color: rgba(102, 192, 244, 0.2);
    transform: translateX(4px);
}

.game-img {
    width: 52px;
    height: 52px;
    border-radius: 4px;
    background: linear-gradient(135deg, #171a21, #2a475e);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

.game-item:hover .game-img {
    transform: scale(1.05);
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-name {
    font-size: 0.9rem;
    color: white;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.game-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.steam-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.2), rgba(66, 169, 233, 0.15));
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(102, 192, 244, 0.25);
    width: 100%;
    gap: 8px;
}

.steam-profile-link:hover {
    background: linear-gradient(135deg, rgba(102, 192, 244, 0.3), rgba(66, 169, 233, 0.25));
    border-color: rgba(102, 192, 244, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.steam-icon-small {
    width: 16px;
    height: 16px;
    filter: brightness(1.5);
}

.no-games {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.no-games::before {
    content: '🎮';
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* --- SPECIFIC CARD STYLES --- */
.about {
    grid-column: span 2;
}

.music {
    grid-column: span 1;
    padding: 0;
    background: var(--card-bg-light);
    display: flex;
    align-items: center;
    min-height: 0;
    box-shadow: 0 0 0 1px rgba(123, 104, 238, 0.15),
              0 8px 24px rgba(0, 0, 0, 0.4);
    position: relative;
}

.music iframe {
    border-radius: var(--radius);
    height: 100%;
    min-height: 152px;
    position: relative;
}


.project {
    grid-column: span 1;
}

.project .status {
    display: flex;
    align-items: center;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gaming {
    grid-column: span 1;
    background: var(--card-bg-light);
}

.gaming-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.thoughts {
    grid-column: span 2;
}

.city {
    grid-column: span 1;
    background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(20, 20, 30, 0.9));
}

.city-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

/* --- BUTTONS & LINKS --- */
.btn-link {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    color: white;
    background: rgba(123, 104, 238, 0.15);
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(123, 104, 238, 0.3);
}

.btn-link:hover {
    background: rgba(123, 104, 238, 0.25);
    transform: translateY(-2px);
    border-color: rgba(123, 104, 238, 0.5);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.social-link:hover {
    color: var(--accent);
}

.emoji {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px 0 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.copyright {
    opacity: 0.7;
    font-size: 0.85rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero {
        grid-column: span 2;
    }
    
    .about {
        grid-column: span 2;
    }
    
    .music {
        grid-column: span 2;
        min-height: 180px;
    }
    
    .thoughts {
        grid-column: span 2;
    }
    
    .steam-widget {
        grid-column: span 2;
    }
}

@media (max-width: 650px) {
    .main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hero, .about, .music, .project, .gaming, .thoughts, .city, .steam-widget {
        grid-column: span 1;
    }
    
    .hero {
        padding: 30px 25px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero .subtitle {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .hero-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .music {
    min-height: 180px; /* Ajusta según necesites */
    height: auto;
    }

    .music iframe {
    height: 152px; /* Fija la altura en móvil */
    min-height: 152px;
    }
    
    .game-item {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .card {
        padding: 20px;
    }
}
