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

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    padding: 10px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-bottom: 4px solid #ffd700;
    color: white;
    padding: 25px 15px;
    text-align: center;
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    color: #ffd700;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.95;
    color: #ddd;
}

.nav-tabs {
    display: flex;
    background: #1a1a1a;
    padding: 0;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid #ffd700;
}

.nav-tab {
    flex: 1;
    min-width: 100px;
    padding: 12px 10px;
    text-align: center;
    color: #ddd;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.nav-tab:hover {
    background: #333;
    color: #ffd700;
}

.nav-tab.active {
    background: #ffd700;
    color: #1a1a1a;
    border-bottom: 3px solid #1a1a1a;
}

.content {
    padding: 15px;
}

.form-container {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ffd700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-container h2 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #1a1a1a;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 11px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    background: #fffef0;
}

small {
    display: block;
    margin-top: 4px;
}

.btn {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a1a;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
}

.btn:active {
    transform: translateY(0);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.search-container input {
    flex: 1;
}

.search-container .btn {
    width: 100%;
}

.result-container {
    background: white;
    border-radius: 8px;
    padding: 0;
}

.participante-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ffd700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.participante-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    word-break: break-word;
    color: #ffd700;
}

.participante-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.info-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 215, 0, 0.08);
    border-radius: 4px;
    border-left: 2px solid #ffd700;
}

.info-label {
    font-weight: bold;
    color: #ffd700;
    display: block;
    margin-bottom: 4px;
}

.alert {
    padding: 14px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
    border-left: 4px solid;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.alert-success {
    background: #e8f5e9;
    color: #1b5e20;
    border-left-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #b71c1c;
    border-left-color: #f44336;
}

.hidden {
    display: none;
}

.btn-secondary {
    background: #666;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #444;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff5252 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

/* ===== ANIMACIONES ===== */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== MEDIA QUERIES - TABLETS (768px) ===== */
@media (min-width: 768px) {
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }
}

/* ===== MEDIA QUERIES - TABLETS (768px) ===== */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    body {
        padding: 15px;
    }

    .header {
        padding: 30px 25px;
    }

    .header h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .header p {
        font-size: 1rem;
    }

    .nav-tab {
        padding: 14px 15px;
        font-size: 0.95rem;
    }

    .content {
        padding: 25px;
    }

    .form-container {
        padding: 25px;
    }

    .form-container h2 {
        font-size: 1.5rem;
    }

    .form-row {
        flex-direction: row;
        gap: 20px;
        margin-bottom: 15px;
    }

    .form-row .form-group {
        flex: 1;
        margin-bottom: 0;
    }

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

    label {
        font-size: 1rem;
        margin-bottom: 7px;
    }

    input, select, textarea {
        padding: 12px;
        font-size: 16px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 1rem;
        width: auto;
    }

    .search-container {
        flex-direction: row;
        gap: 15px;
    }

    .search-container input {
        flex: 1;
    }

    .search-container .btn {
        width: auto;
        flex: 0 0 auto;
    }

    .participante-card {
        padding: 20px;
    }

    .participante-card h3 {
        font-size: 1.4rem;
    }

    .participante-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .alert {
        padding: 15px;
        font-size: 1rem;
    }
}

/* ===== MEDIA QUERIES - DESKTOP (1024px) ===== */
@media (min-width: 1024px) {
    body {
        padding: 20px;
    }

    .header {
        padding: 35px 30px;
    }

    .header h1 {
        font-size: 2.5rem;
    }

    .header p {
        font-size: 1.05rem;
    }

    .nav-tab {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .content {
        padding: 30px;
    }

    .form-container {
        padding: 30px;
    }

    .form-container h2 {
        font-size: 1.6rem;
    }

    .form-row {
        gap: 25px;
    }

    .participante-info {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }

    .participante-card {
        padding: 25px;
    }

    .participante-card h3 {
        font-size: 1.5rem;
    }

    .info-item {
        padding: 12px;
    }

    .btn-quick-edit {
        font-size: 0.85rem !important;
        padding: 6px 10px !important;
    }
}

/* ===== MEDIA QUERIES - LARGE DESKTOP (1440px) ===== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .header h1 {
        font-size: 2.8rem;
    }

    .form-row {
        gap: 30px;
    }

    .participante-info {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* ===== MEDIA QUERIES - VERY SMALL DEVICES (320px) ===== */
@media (max-width: 380px) {
    body {
        padding: 8px;
    }

    .container {
        border-radius: 8px;
    }

    .header {
        padding: 18px 12px;
        border-bottom: 3px solid #ffd700;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 6px;
        color: #ffd700;
    }

    .header p {
        font-size: 0.85rem;
        color: #ddd;
    }

    .nav-tabs {
        border-bottom: 2px solid #ffd700;
    }

    .nav-tab {
        padding: 10px 8px;
        font-size: 0.75rem;
        min-width: 70px;
        border-bottom: 2px solid transparent;
    }

    .nav-tab.active {
        background: #ffd700;
        color: #1a1a1a;
    }

    .content {
        padding: 12px;
    }

    .form-container {
        padding: 14px;
        border-left: 3px solid #ffd700;
        margin-bottom: 12px;
    }

    .form-container h2 {
        font-size: 1.15rem;
        margin-bottom: 12px;
        color: #1a1a1a;
        border-bottom: 2px solid #ffd700;
    }

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

    label {
        font-size: 0.9rem;
        margin-bottom: 5px;
        color: #1a1a1a;
        font-weight: 600;
    }

    input, select, textarea {
        padding: 10px;
        font-size: 14px;
        border: 2px solid #ddd;
        border-radius: 5px;
    }

    input:focus, select:focus, textarea:focus {
        border-color: #ffd700;
        box-shadow: 0 0 6px rgba(255, 215, 0, 0.3);
    }

    .btn {
        padding: 11px 16px;
        font-size: 0.9rem;
        font-weight: bold;
        background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
        color: #1a1a1a;
        border-radius: 5px;
        margin-top: 6px;
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }

    .participante-card {
        padding: 12px;
        margin-bottom: 12px;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        border-left: 3px solid #ffd700;
        border-radius: 6px;
    }

    .participante-card h3 {
        font-size: 1.05rem;
        margin-bottom: 10px;
        color: #ffd700;
    }

    .info-item {
        margin-bottom: 8px;
        padding: 7px;
        font-size: 0.9rem;
        background: rgba(255, 215, 0, 0.08);
        border-left: 2px solid #ffd700;
    }

    .info-label {
        color: #ffd700;
        font-weight: bold;
        margin-bottom: 3px;
    }

    .alert {
        padding: 12px;
        font-size: 0.9rem;
        border-left: 4px solid;
    }
}

/* ===== ORIENTACIÓN LANDSCAPE EN MÓVILES ===== */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding: 5px;
    }

    .header {
        padding: 15px 10px;
    }

    .header h1 {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .header p {
        font-size: 0.8rem;
    }

    .nav-tab {
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .content {
        padding: 10px;
    }

    .form-container {
        padding: 12px;
    }

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

    input, select, textarea {
        font-size: 14px;
    }

    .participante-info {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 8px;
    }

    .btn-quick-edit {
        padding: 5px 8px !important;
        font-size: 0.7rem !important;
        margin: 3px 2px;
    }
}

/* ===== MEDIA QUERIES - STAT CARDS (MOBILE) ===== */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stat-card-large {
        padding: 15px !important;
    }

    .stat-value {
        font-size: 1.8rem !important;
    }

    .stat-title {
        font-size: 0.85rem !important;
    }

    .stat-subtitle {
        font-size: 0.75rem !important;
    }

    .section {
        padding: 15px !important;
    }

    .section-title {
        font-size: 1.2rem !important;
    }

    .bar-label {
        min-width: 100px !important;
        font-size: 0.8rem !important;
    }

    .mini-stat {
        padding: 12px !important;
    }

    .mini-stat-value {
        font-size: 1.5rem !important;
    }

    .mini-stat-label {
        font-size: 0.75rem !important;
    }
}

/* ===== MEDIA QUERIES - STAT CARDS (TABLET) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stat-card-large {
        padding: 18px !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    .stat-title {
        font-size: 0.9rem !important;
    }

    .bar-label {
        font-size: 0.85rem !important;
    }
}

/* ===== MEDIA QUERIES - STAT CARDS (DESKTOP) ===== */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .stat-card-large {
        padding: 20px !important;
    }

    .stat-value {
        font-size: 2.5rem !important;
    }

    .bar-label {
        font-size: 0.9rem !important;
    }
}