/* assets/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
}

:root {
    --ios-blue: #007AFF;
    --ios-gray-light: #F2F2F7;
    --ios-gray: #8E8E93;
    --ios-gray-dark: #1C1C1E;
    --ios-green: #34C759;
    --ios-red: #FF3B30;
    --ios-orange: #FF9500;
    --ios-card: #FFFFFF;
    --ios-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --ios-border: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--ios-gray-light);
    color: var(--ios-gray-dark);
    padding-bottom: 80px;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(to right, #007AFF, #5856D6);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 25px;
    box-shadow: var(--ios-shadow);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 10px;
}

.db-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 5px;
}

.service-card {
    background-color: var(--ios-card);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--ios-shadow);
    border: 1px solid var(--ios-border);
    transition: transform 0.2s ease;
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.service-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.service-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-info h3 {
    font-size: 18px;
    font-weight: 600;
}

.service-info p {
    font-size: 14px;
    color: var(--ios-gray);
    margin-top: 3px;
}

.credentials {
    background-color: var(--ios-gray-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.credential-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.credential-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--ios-gray);
    min-width: 70px;
}

.credential-value {
    flex-grow: 1;
    padding: 0 15px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    word-break: break-all;
}

.password-field {
    position: relative;
    display: flex;
}

.password-field input {
    padding-right: 45px;
    flex: 1;
}

.btn-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ios-gray);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy {
    background-color: var(--ios-blue);
    color: white;
}

.btn-edit {
    background-color: var(--ios-gray-light);
    color: var(--ios-gray-dark);
}

.btn:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.copy-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ios-gray-light);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 10px;
    color: var(--ios-gray);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--ios-card);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 25px 10px;
    border-bottom: 1px solid var(--ios-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ios-gray);
}

.modal-body {
    padding: 20px 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--ios-border);
    font-size: 16px;
    background-color: var(--ios-gray-light);
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--ios-border);
}

.btn-cancel {
    background-color: var(--ios-gray-light);
    color: var(--ios-gray-dark);
}

.btn-save, .btn-confirm {
    background-color: var(--ios-green);
    color: white;
}

.confirm-modal .warning {
    color: var(--ios-orange);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 149, 0, 0.1);
    border-radius: 8px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--ios-gray);
}

.loading i {
    font-size: 40px;
    margin-bottom: 15px;
}

/* Cores específicas dos serviços */
.disney { background-color: #113CCF; }
.youtube { background-color: #FF0000; }
.hbo { background-color: #00A0DC; }
.prime { background-color: #00A8E1; }
.globo { background-color: #ED3237; }
.netflix { background-color: #E50914; }

.disney-text { color: #113CCF; }
.youtube-text { color: #FF0000; }
.hbo-text { color: #00A0DC; }
.prime-text { color: #00A8E1; }
.globo-text { color: #ED3237; }
.netflix-text { color: #E50914; }

/* Footer */
footer {
    text-align: center;
    padding: 25px 20px;
    color: var(--ios-gray);
    font-size: 14px;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--ios-gray-light);
    border-top: 1px solid var(--ios-border);
}

/* Responsividade */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .service-card {
        padding: 15px;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 24px;
    }
    
    footer {
        position: relative;
        margin-top: 20px;
    }
}