/* Hose-Proxy PWA Styles - Mobile-First Design */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #111827;
    color: #f3f4f6;
    min-height: 100vh;
    line-height: 1.5;
}

/* Container */
.container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    background: linear-gradient(to right, #2563eb, #1e40af);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-text h1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0;
}

.brand-text p {
    font-size: 0.875rem;
    color: #bfdbfe;
    margin: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-ready { background-color: #374151; color: #d1d5db; }
.status-playing { background-color: #064e3b; color: #6ee7b7; }
.status-connecting { background-color: #78350f; color: #fbbf24; }
.status-error { background-color: #7f1d1d; color: #fca5a5; }

/* Main content */
main {
    padding: 2rem 0;
}

/* Sections */
.section {
    background-color: #1f2937;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.section-header svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

.section-header.text-blue { color: #60a5fa; }
.section-header.text-green { color: #6ee7b7; }

/* Utility color classes */
.text-blue { color: #60a5fa; }
.text-green { color: #6ee7b7; }

/* Form elements */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #374151;
    border: 1px solid #4b5563;
    border-radius: 0.5rem;
    color: white;
    font-size: 1.125rem;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Button grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.button-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:not(:disabled):hover {
    transform: scale(1.05);
}

.btn:not(:disabled):active {
    transform: scale(0.95);
}

.btn svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
}

.btn-primary { background-color: #2563eb; color: white; }
.btn-primary:not(:disabled):hover { background-color: #1d4ed8; }

.btn-secondary { background-color: #374151; color: #d1d5db; }
.btn-secondary:not(:disabled):hover { background-color: #4b5563; }

.btn-green { background-color: #16a34a; color: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); }
.btn-green:not(:disabled):hover { background-color: #15803d; }

.btn-red { background-color: #dc2626; color: white; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3); }
.btn-red:not(:disabled):hover { background-color: #b91c1c; }

.btn-lg {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
}

.btn.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* Format hint */
.format-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Player section */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.player-header h2 {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
    white-space: nowrap;
}

.player-header svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.current-tg {
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.125rem;
}

.vlc-link {
    color: #f97316;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.vlc-link svg {
    width: 1.75rem;
    height: 1.75rem;
}

.vlc-link:hover {
    color: #ea580c;
    transform: translateX(3px);
}

audio {
    width: 100%;
    margin-top: 1rem;
}

/* Quick links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-link {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #374151;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    color: white;
}

.quick-link:hover {
    background-color: #4b5563;
}

.quick-link-content {
    display: flex;
    flex-direction: column;
}

.quick-link-title {
    font-weight: 600;
    color: white;
}

.quick-link-subtitle {
    font-size: 0.875rem;
    color: #9ca3af;
}

.quick-link svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #9ca3af;
    transition: color 0.2s;
}

.quick-link:hover svg {
    color: white;
}

/* Links */
.link-button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #1f2937;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.link-button:hover {
    background-color: #374151;
}

.link-button svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* Footer */
footer {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    padding: 2rem 0;
}

footer p {
    margin: 0.5rem 0;
}

.install-prompt {
    display: inline-block;
    margin-top: 0.5rem;
}

.install-btn {
    background: none;
    border: none;
    color: #60a5fa;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
}

.install-btn:hover {
    color: #93c5fd;
}

/* Utility classes */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.opacity-50 { opacity: 0.5; }
.cursor-not-allowed { cursor: not-allowed; }

/* Responsive */
@media (max-width: 640px) {
    .header-content {
        padding: 1rem;
    }
    
    .brand-text h1 {
        font-size: 1.25rem;
    }
    
    .status-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    main {
        padding: 1rem 0;
    }
    
    .section {
        padding: 1rem;
    }
}

@media (min-width: 768px) {
    .button-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
